text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
import { SearchParameters } from 'algoliasearch-helper'; import type { ConnectorDescription, ConnectedProps, } from '../../core/createConnector'; import type { QueryRulesProps } from '../connectQueryRules'; import connectReal from '../connectQueryRules'; jest.mock( '../../core/createConnector', () => (connecto...
the_stack
import { getGeneralTriggerFinalOptions, getThirdPartyTrigger, getGlobalThirdPartyTrigger, isPromise, log, getWebhookByRequest, Cursor, getLocalTrigger, filter as filterFn, getStringFunctionResult, ITriggerInternalResult, AnyObject, ITriggerClassTypeConstructable, ITriggerResult, ITriggerRe...
the_stack
import { buildPipelinesRelation, buildTopicsMap, buildTopicsRelation, PipelineRelationMap, PipelinesMap, TopicRelationMap, TopicsMap } from '@/services/data/pipeline/pipeline-relations'; import {listConnectedSpacesForExport} from '@/services/data/tuples/connected-space'; import {ConnectedSpace} from '@/services/...
the_stack
interface NodeMessage { topic?: string; payload?: any; _msgid?: string; [other: string]: any; //permit other properties } /** @type {NodeMessage} the `msg` object */ declare var msg: NodeMessage; /** @type {string} the id of the incoming `msg` (alias of msg._msgid) */ declare const __msgid__:string; /...
the_stack
import * as d3 from 'd3' import {SimpleEventHandler} from "../etc/SimpleEventHandler"; import {WordLine, WordLineHoverEvent} from "../vis/WordLine" import {AttentionVis, AttentionVisData} from "../vis/AttentionVis"; import {WordProjector, WordProjectorClickedEvent} from "../vis/WordProjector"; import {S2SApi, TrainDat...
the_stack
import * as path from "path"; import * as shell from "shelljs"; import * as _ from "lodash"; import * as constants from "../constants"; import * as semver from "semver"; import * as projectServiceBaseLib from "./platform-project-service-base"; import { DeviceAndroidDebugBridge } from "../common/mobile/android/device-an...
the_stack
import { DeleteObjectCommand, DeleteObjectsCommand, GetObjectCommand, ListObjectsV2Command, S3Client, } from "@aws-sdk/client-s3"; import { getSignedUrl } from "@aws-sdk/s3-request-presigner"; import { Drive } from "@prisma/client"; import { cryptoHexEncodedHash256, cryptoMd5Method, signRequest } from "@util/helpe...
the_stack
import { GraphQLID, GraphQLString } from 'graphql'; import memorize from 'memorize-decorator'; import { ACCESS_GROUP_FIELD, FLEX_SEARCH_FULLTEXT_INDEXED_DIRECTIVE, FLEX_SEARCH_INDEXED_DIRECTIVE, FLEX_SEARCH_ORDER_ARGUMENT, ID_FIELD, ROOT_ENTITY_DIRECTIVE, SCALAR_INT, SCALAR_STRING } from...
the_stack
import * as React from 'react'; import './App.css'; import Toolbar from './components/toolbar/toolbar'; import Viewport from './components/viewport/viewport'; import Connection from './connection'; import { ExtensionConfiguration } from '../ext-src/extensionConfiguration'; import { resolve as getElementSourceMetadata ...
the_stack
interface JQuery { validate: any; collapse: any; } module OCM { export class LocationEditor extends OCM.AppBase { editorMapInitialised: boolean; editorMap: any; editMarker: any; positionAttribution: any; numConnectionEditors: number; isLocationEdi...
the_stack
import { createElement, L10n, isNullOrUndefined } from '@syncfusion/ej2-base'; import { RadioButton, ChangeArgs, CheckBox } from '@syncfusion/ej2-buttons'; import { DocumentEditor } from '../../document-editor'; import { DocumentHelper, ElementBox } from '../viewer'; import { FieldElementBox, CheckBoxFormField } from '...
the_stack
import type { Operation } from '../http/Operation'; import type { ErrorHandler } from '../http/output/error/ErrorHandler'; import { RedirectResponseDescription } from '../http/output/response/RedirectResponseDescription'; import { ResponseDescription } from '../http/output/response/ResponseDescription'; import { BasicR...
the_stack
import * as d3ScaleChromatic from 'd3-scale-chromatic' import * as d3Scale from 'd3-scale' import { Data, Mdata, IsMdata } from '@/components/Mindmap/interface' import { BoundingBox, Layout } from './flextree' type GetSize = (text: string) => { width: number, height: number } type Processer = (d: Mdata, id: string) =>...
the_stack
import {AfterViewInit, Component, ElementRef, HostBinding, Injector, OnDestroy, OnInit, ViewChild} from '@angular/core'; import {AbstractComponent} from '@common/component/abstract.component'; import {StateService} from '../service/state.service'; import {EngineService} from '../service/engine.service'; import {Engine}...
the_stack
import type { HunspellCosts, HunspellInformation } from '../models/DictionaryInformation'; import { hunspellInformationToSuggestionCostDef, __testing__ } from './mapHunspellInformation'; // cspell:ignore conv OCONV const { affMap, affRepConv, affNoTry, affTry, affKey, affTryFirstCharacterReplac...
the_stack
import * as debugFactory from "debug"; import { QueryConfig } from "pg"; import LRU from "@graphile/lru"; const debug = debugFactory("pg-sql2"); function debugError(err: Error) { debug(err); return err; } const $$trusted = Symbol("trusted"); interface SQLRawNode { text: string; type: "RAW"; [$$trusted]: t...
the_stack
import { K8sManagement } from './k8s-sdk/k8s-management' import { BoosterConfig, Logger } from '@boostercloud/framework-types' import { getProjectNamespaceName, createProjectZipFile, uploadFile, waitForIt } from './utils' import { uploadService } from './templates/upload-service-template' import { boosterVolumeClaim } ...
the_stack
import {isIE10} from './setup'; import * as assert from 'assert'; import isolate from '@cycle/isolate'; import xs, {Stream, MemoryStream} from 'xstream'; import delay from 'xstream/extra/delay'; import concat from 'xstream/extra/concat'; import {setup, run as cycleRun} from '@cycle/run'; const Snabbdom = require('snabb...
the_stack
import { getVoidLogger } from '@backstage/backend-common'; import { ConfigReader } from '@backstage/config'; import { ScmIntegrations } from '@backstage/integration'; import fs from 'fs-extra'; import mockFs from 'mock-fs'; import os from 'os'; import path, { resolve as resolvePath } from 'path'; import { ParsedLocatio...
the_stack
import { SENSITIVE_STRING } from "@aws-sdk/smithy-client"; import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types"; /** * <p>You do not have sufficient permissions to perform this action. </p> */ export interface AccessDeniedException extends __SmithyException, $Metad...
the_stack
import { EventEmitter } from "./event" const print = console.log.bind(console) const _indexedDB = (typeof window != "undefined") ? ( window.indexedDB || window["mozIndexedDB"] || window["webkitIndexedDB"] || window["msIndexedDB"]) : null as unknown as IDBFactory export const supported = !!_indexedDB // Upgrade...
the_stack
import { DerEncodedPublicKey, HttpAgentRequest, PublicKey, requestIdOf, Signature, SignIdentity, } from '@dfinity/agent'; import { Principal } from '@dfinity/principal'; import * as cbor from 'simple-cbor'; import { fromHexString, toHexString } from '../buffer'; const domainSeparator = new TextEncoder().en...
the_stack
interface DbState { database: Database; version: DOMString; transaction: (callback: SQLTransactionCallback, errorCallback?: SQLTransactionErrorCallback, successCallback?: SQLVoidCallback) => void; readTransaction: (callback: SQLTransactionCallback, errorCallback?: SQLTransactionErrorCallback, successCal...
the_stack
import * as assert from 'assert'; import { IgnoreFile } from 'vs/workbench/services/search/common/ignoreFile'; function runAssert(input: string, ignoreFile: string, ignoreFileLocation: string, shouldMatch: boolean, traverse: boolean) { return (prefix: string) => { const isDir = input.endsWith('/'); const rawInput...
the_stack
import { EventEmitter } from 'events' import * as rlp from 'rlp' import ms from 'ms' import snappy from 'snappyjs' import { debug as createDebugLogger } from 'debug' import { int2buffer, buffer2int, assertEq, formatLogData } from '../util' import { Peer, DISCONNECT_REASONS } from '../rlpx/peer' const DEBUG_BASE_NAME =...
the_stack
import { TypedArrayConstructor, TypedArray, NestedArrayData } from "../../src/nestedArray/types"; import { createNestedArray, rangeTypedArray } from "../../src/nestedArray"; import { Slice } from "../../src/core/types"; import { slice } from "../../src/core/slice"; import { sliceNestedArray } from "../../src/nestedArra...
the_stack
'use strict' const Uniq: any = require('lodash.uniq') const Eraro: any = require('eraro') import Nua from 'nua' import { Ordu, TaskSpec } from 'ordu' // TODO: refactor: use.js->plugin.js and contain *_plugin api methods too const Common: any = require('./common') const Print: any = require('./print') /* $lab:cover...
the_stack
import { Injectable, Injector } from '@angular/core'; import { BehaviorSubject, Observable } from 'rxjs'; import { ArtemisOrionConnector, ExerciseView, OrionState } from 'app/shared/orion/orion'; import { Router } from '@angular/router'; import { REPOSITORY } from 'app/exercises/programming/manage/code-editor/code-edit...
the_stack
import S3 from 'aws-sdk/clients/s3'; import Rekognition from 'aws-sdk/clients/rekognition'; import sharp, { FormatEnum, OverlayOptions, ResizeOptions } from 'sharp'; import { BoundingBox, BoxSize, ImageEdits, ImageFitTypes, ImageFormatTypes, ImageHandlerError, ImageRequestInfo, RekognitionCompatibleImage, StatusCodes ...
the_stack
import { Point, Range, TextEditor } from "atom"; import escapeStringRegexp from "escape-string-regexp"; import stripIndent from "strip-indent"; import compact from "lodash/compact"; import { log, isMultilanguageGrammar, getEmbeddedScope, rowRangeForCodeFoldAtBufferRow, js_idx_to_char_idx, } from "./utils"; im...
the_stack
import React, { useCallback, useContext, useEffect, useMemo } from 'react' import Spin from 'antd/lib/spin' import cn from 'classnames' import { matchPath } from 'react-router' import { Dispatch } from 'redux' import { ReactComponent as IconAlbum } from 'assets/img/iconAlbum.svg' import { ReactComponent as IconBigSea...
the_stack
import { addFunction, amplifyPushAuth, amplifyPushMissingFuncSecret, createNewProjectDir, deleteProject, deleteProjectDir, getCategoryParameters, getParameters, getProjectMeta, getSSMParameters, initJSProjectWithProfile, invokeFunction, overrideFunctionCodeNode, removeFunction, setCategory...
the_stack
declare namespace google { export function load( moduleName: string, moduleVersion: string, optionalSettings?: any ): void; } declare namespace google.earth { /** * Specifies the current stage of the flow of events. */ export type GEEventPhaseEnum = any; /** * S...
the_stack
import {ErrorResponse} from "helpers/api_request_builder"; import _ from "lodash"; import m from "mithril"; import Stream from "mithril/stream"; import {PackagesCRUD} from "models/package_repositories/packages_crud"; import {Package, PackageRepositories, PackageRepository, PackageRepositorySummary, Packages} from "mode...
the_stack
import * as React from 'react' import * as d3 from 'd3' import { layoutTextLabel, layoutGreedy, layoutLabel } from 'd3fc-label-layout' import { YtModel, ChannelData } from '../../common/YtModel' import { SelectableCell, DimQuery, Dim, ColEx } from '../../common/Dim' import { YtInteractiveChartHelper } from "../../commo...
the_stack
import * as _ from 'underscore'; const d3Format: any = require('d3-format'); const d3TimeFormat: any = require('d3-time-format'); import { CellRenderer, TextRenderer, HyperlinkRenderer, } from '@lumino/datagrid'; import { Dict, WidgetModel, WidgetView, ISerializers, resolvePromisesDict, unpack_mode...
the_stack
// clang-format off import 'chrome://resources/cr_elements/cr_input/cr_input.m.js'; import {CrInputElement} from 'chrome://resources/cr_elements/cr_input/cr_input.m.js'; import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {assertEquals, assertFalse, assertNotEquals, assertThro...
the_stack
import { isArray } from '@antv/util'; import rectPath from './rect-path'; import path2Curve from './path-2-curve'; const base3 = function (t: number, p1: number, p2: number, p3: number, p4: number): number { const t1 = -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4; const t2 = t * t1 + 6 * p1 - 12 * p2 + 6 * p3; return t *...
the_stack
import modalMixin from './modal-mixin' import ProgressBar from '../../vue/component/ProgressBar.vue' import TabSmall from '../../vue/component/TabSmall.vue' import InputRadio from '../../vue/component/InputRadio.vue' import InputText from '../../vue/component/InputText.vue' import privateStatus from './calculator-data'...
the_stack
import { mXparserConstants } from '../mXparserConstants'; /** * Random variables - mXparserConstants tokens definition. * * @author <b>Mariusz Gromada</b><br> * <a href="mailto:mariuszgromada.org@gmail.com">mariuszgromada.org@gmail.com</a><br> * <a href="http://github.com/mariuszgromada/MathParser.org-mX...
the_stack
import type * as I from '@apollo-elements/core/types'; import type { ApolloSubscriptionElement } from '@apollo-elements/core/types'; import { SetupFunction } from './types'; import { aTimeout, defineCE, expect, fixture, nextFrame } from '@open-wc/testing'; import { gql, ApolloClient, InMemoryCache } from '@apollo/c...
the_stack
import * as cp from 'child_process'; import * as minimatch from 'minimatch'; import { dirname, join, normalize, relative, sep } from 'path'; import type * as tslint from 'tslint'; import type { IConfigurationFile } from 'tslint/lib/configuration'; import type * as typescript from 'typescript'; import * as util from 'ut...
the_stack
import { should, expect } from 'chai'; import sinon from 'sinon'; import { HealthEndpoint, ReadinessEndpoint, LivenessEndpoint, HealthChecker, StartupCheck, LivenessCheck, ReadinessCheck, ShutdownCheck } from '../../index'; import {NextFunction} from 'connect'; import * as http from "http"; should(); describe('Connec...
the_stack
interface Window { mapsforge: MapsforgePlugin; } declare var mapsforge: MapsforgePlugin; interface MapsforgePlugin { embedded: MapsforgeEmbeddedPlugin; cache: MapsforgeCachePlugin; } interface MapsforgeEmbeddedPlugin { COLOR_DKGRAY: number|string; COLOR_CYAN: number|string; COLOR_BLACK: numb...
the_stack
declare global { interface EventTarget { attachEvent?: (type: string, fn: EventListenerOrEventListenerObject) => void; } } /** * The criteria which will be used to filter results to specific classes or elements */ export interface FilterCriterion<T> { /** A collection of class names to include */ allowli...
the_stack
import * as React from 'react' import { Colors } from '@xstyled/system' import { toCustomPropertiesDeclarations, toCustomPropertiesReferences, } from './customProperties' type ColorModeState = [string | null, (mode: string | null) => void] interface ColorModes { [key: string]: Colors } interface ITheme { use...
the_stack
import { DefaultLogEvent, DI, IContainer, ILogger, ISink, LoggerConfiguration, LogLevel, pascalCase, Registration, sink, optional, Task, TaskStatus, Class, } from '@aurelia/kernel'; import { bindingBehavior, BindingBehaviorInstance, Controller, customElement, CustomElement, IBind...
the_stack
import * as coreClient from "@azure/core-client"; /** High-level information about a Template Spec version. */ export interface TemplateSpecVersionInfo { /** * Template Spec version description. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly description?:...
the_stack
import { createConnection, TextDocuments, ProposedFeatures, InitializeParams, DidChangeConfigurationNotification, CompletionItem, CompletionItemKind, ClientCapabilities, Command, Range, MarkedString, MarkupContent, Location, DocumentSymbol, SymbolKind, WorkspaceEdit, TextEdit, ColorPresentation, Colo...
the_stack
import "./matchers"; import { Production, RightHandSideList, RightHandSide, Nonterminal } from "../nodes"; import { Parser } from "../parser"; import { NodeNavigator } from "../navigator"; import { SyntaxKind } from "../tokens"; import { makeExpectToken } from "./navigatorUtils"; describe("Navigator", () => { ...
the_stack
import { TreeGrid } from '../base/treegrid'; import { Grid, InfiniteScroll as GridInfiniteScroll, ActionEventArgs, NotifyArgs } from '@syncfusion/ej2-grids'; import { InfiniteScrollArgs, Column, Row, RowRenderer, ServiceLocator, resetRowIndex } from '@syncfusion/ej2-grids'; import { getValue, isNullOrUndefined, remove ...
the_stack
import { Component, OnDestroy, OnInit } from '@angular/core'; import { AbstractTrackableComponent } from '../../../shared/trackable/abstract-trackable.component'; import { DynamicFormControlModel, DynamicFormGroupModel, DynamicFormLayout, DynamicFormService, DynamicInputModel, DynamicOptionControlModel, D...
the_stack
import { IServer } from "./IServer.interface"; import { ISocket } from "./ISocket.interface"; import { EventEmitter } from "./EventEmitter"; import { Stub } from "./Stub"; import { Transport } from "./Transport"; import { Util } from "./Util.class"; import { Contract } from "./Contract.class"; import { Protocol } from...
the_stack
import { join } from 'path'; import type { DeviceDescriptor, ConfigDescriptor, BosDescriptor } from './descriptors'; /* eslint-disable @typescript-eslint/no-var-requires */ const usb = require('node-gyp-build')(join(__dirname, '..', '..')); module.exports = usb; /** * Return a list of `Device` objects for the USB de...
the_stack
import * as chaiAsPromised from "chai-as-promised"; import * as chai from "chai"; chai.use(chaiAsPromised); const { expect } = chai; import { ReadableStream, Stream, Transform, batcher, mapper, compose, } from "../lib/index"; import "./mocha-init"; import { defer, delay, settle, track, readInto, identity } from...
the_stack
import { DateTime } from "luxon"; import { Collection } from "mongodb"; import { MongoContext } from "coral-server/data/context"; import { CommentNotFoundError } from "coral-server/errors"; import { addCommentTag, Comment, CommentConnectionInput, removeCommentTag, retrieveAllCommentsUserConnection as retriev...
the_stack
import { Server } from "@server/index"; import { FileSystem } from "@server/fileSystem"; import { Queue } from "@server/databases/server/entity/Queue"; import { ValidTapback } from "@server/types"; import { sendMessage, startChat, renameGroupChat, addParticipant, removeParticipant, toggleTapback...
the_stack
import 'mocha' import { expect } from 'chai' import * as C from '../../constants' import RpcHandler from './rpc-handler' import * as testHelper from '../../test/helper/test-helper' import { getTestMocks } from '../../test/helper/test-mocks' import { RpcProxy } from './rpc-proxy' const options = testHelper.getDeepstr...
the_stack
import gLong from './gLong'; import ByteStream from './ByteStream'; import * as util from './util'; import {ConstantPoolItemType, MethodHandleReferenceKind} from './enums'; import assert from './assert'; import {ReferenceClassData, ArrayClassData, IJVMConstructor, PrimitiveClassData} from './ClassData'; import {Method,...
the_stack
import React from 'react'; import { JSONSchema7 as JSONSchema } from 'json-schema'; import isEqual from 'lodash/isEqual'; import size from 'lodash/size'; import intersectionBy from 'lodash/intersectionBy'; import { Lenses, CollectionLenses } from './Lenses'; import { Tags } from './Tags'; import { Create } from './Acti...
the_stack
import { ITreeNode, ITreeView } from "@abstractions/project-node"; import { ILiteEvent, LiteEvent } from "@core/utils/lite-event"; /** * This class implements a tree node. * @param TNode The type of tree nodes */ export class TreeNode<TNode> implements ITreeNode<TNode> { private _parentNode: ITreeNode<TNode> | un...
the_stack
import { Component, Input, OnInit, Output, EventEmitter } from '@angular/core'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { ClientService } from '../services/client.service'; import { SampleBusinessNetworkService } from '../services/samplebusinessnetwork.service'; import { AlertService } from '../b...
the_stack
import * as i18n from "i18next"; import * as _ from "lodash"; import { Logger, LogLevel } from "sp-pnp-js"; import ITaxonomyNavigationNode from "../models/ITaxonomyNavigationNode"; import TaxonomyNavigationNode from "../models/TaxonomyNavigationNode"; import LocalizationModule from "./LocalizationModule"; class Taxono...
the_stack
* Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import { TurnContext } from 'botbuilder-core'; import { QnAMakerResult } from '../qnamaker-interfaces/qnamakerResult'; import { QnAMakerResults } from '../qnamaker-interfaces/qnamakerResults'; import { QnAMakerEndpoint ...
the_stack
import {Value} from './value'; import {fuzzyAssertInRange, fuzzyEquals, fuzzyRound} from './utils'; import {hash} from 'immutable'; interface RgbColor { red: number; green: number; blue: number; alpha: number; } interface HslColor { hue: number; saturation: number; lightness: number; alpha: number; } ...
the_stack
import { _, CommandManager, DocumentManager, EditorManager, MainViewManager } from "./brackets-modules"; import * as ErrorHandler from "./ErrorHandler"; import * as Events from "./Events"; import EventEmitter from "./EventEmitter"; import * as Git from "./git/GitCli"; import * as Preferences from "./Preferences"; let ...
the_stack
import * as path from "path"; import * as vscode from "vscode"; import * as sdk from "vscode-iot-device-cube-sdk"; import { OperationCanceledError } from "../common/Error/OperationCanceledError"; import { FileNames, OperationType, ScaffoldType } from "../constants"; import { FileUtility } from "../FileUtility"; ...
the_stack
import {canvasPath, CanvasKeyframe} from "./animate"; const genKeyframe = (): CanvasKeyframe => ({ duration: 1000 * Math.random(), delay: 1000 * Math.random(), timingFunction: "linear", callback: () => {}, blobOptions: { extraPoints: Math.floor(10 * Math.random()), randomness: Math....
the_stack
"use strict"; export default function (joint) { var g = joint.g; joint.routers.manhattan = (function (g, asd, joint, util) { var config = { // size of the step to find a route (the grid of the manhattan pathfinder) step: 10, // the number of route finding loops that cause the router to abort...
the_stack
'use strict'; import { remote } from 'electron'; import { sleep } from 'chord/base/common/time'; import { Logger, LogLevel } from 'chord/platform/log/common/log'; import { filenameToNodeName } from 'chord/platform/utils/common/paths'; const loggerWarning = new Logger(filenameToNodeName(__filename), LogLevel.Warning);...
the_stack
import {net, hrTime, tls} from "./adapter.node"; import char, * as chars from "./chars"; import {resolveErrorCode} from "./errors/resolve"; import * as errors from "./errors"; import { ReadMessageBuffer, WriteMessageBuffer, ReadBuffer, WriteBuffer, } from "./buffer"; import {versionGreaterThan, versionGreaterT...
the_stack
import { AuthInfo, Connection } from '@salesforce/core'; import { MockTestOrgData, testSetup } from '@salesforce/core/lib/testSetup'; import { expect } from 'chai'; import * as fs from 'fs'; import * as path from 'path'; import { createSandbox, SinonStub, stub } from 'sinon'; import { isNullOrUndefined } from 'util'; i...
the_stack
import { BlockRegData, BlockPortRegData } from "../Define/BlockDef"; import { Block } from "../Define/Block"; import CommonUtils from "../../utils/CommonUtils"; import AllEditors from "../TypeEditors/AllEditors"; import StringUtils from "../../utils/StringUtils"; import { BlockPort, BlockPortDirection } from "../Define...
the_stack
import { GameDriver } from "../gameDriver"; import { Dir } from "fs-extra"; import { Language } from "../../state"; import { KaiDiscipline, MgnDiscipline, GndDiscipline } from "../../model/disciplinesDefinitions"; import { BookSeriesId, BookSeries } from "../../model/bookSeries"; import { Disciplines } from "../../mode...
the_stack
export const isEmail = (s: string) => /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/.test(s) // 手机号码 export const isMobile = (s: string) => /^1[0-9]{10}$/.test(s) // 电话号码 export const isPhone = (s: string) => /^([0-9]{3,4}-)?[0-9]{7,8}$/.test(s) // 是否URL地址 export const isURL = (s: string) => /^htt...
the_stack
import { html, render } from "lit-html"; import { eventmit } from "eventmit"; export type TextCheckerPopupElementAttributes = { target?: HTMLElement; }; export type TextCheckerCard = { id: string; message: string; messageRuleId: string; fixable: boolean; }; export type TextCheckerCardRect = { l...
the_stack
import xml = require("../xml/index"); import utils = require("../utils"); import file = require("../FileUtil"); import CodeUtil = require("./code_util"); import exml_config = require("./exml_config"); var compiler: EXMLCompiler; export function compile(exmlPath: string, srcPath: string): egret.TaskResult { var r...
the_stack
import { $log } from '@tsed/logger'; import { BigNumber } from 'bignumber.js'; import moment from 'moment'; import { bootstrap, TestTz } from '../bootstrap-sandbox'; import { Contract, bytes, address } from '../../src/type-aliases'; import { MintNftParam, originateFtFaucet, originateNftFaucet, originateEnglishA...
the_stack
//Set to false to test remotely even when running it locally const TEST_LOCAL_DEFAULT = true; const TEST_LOCAL: boolean = hasSetting('remote') || !!process.env.TRAVIS ? false : TEST_LOCAL_DEFAULT; const TIME_MODIFIER = 1.2; const LOCAL_URL = 'http://localhost:9515'; function hasSetting(setting: string) { return pro...
the_stack
import React from 'react'; import PropTypes from 'prop-types'; import { Editor, EditorState, ContentState, CompositeDecorator, Modifier, getDefaultKeyBinding, KeyBindingUtil, DefaultDraftBlockRenderMap, DraftBlockRenderConfig, DraftInlineStyle, } from 'draft-js'; import { List, Map } from 'immutab...
the_stack
import * as nodeunit from 'nodeunit'; import * as fs from 'fs'; import * as path from 'path'; import * as or from '../tasks/modules/optionsResolver'; import * as tsconfig from '../tasks/modules/tsconfig'; import * as utils from '../tasks/modules/utils'; import * as _ from 'lodash'; import { testExpectedFile } from './t...
the_stack
module txt { export enum VerticalAlign { Top, CapHeight, Center, BaseLine, Bottom, XHeight, Ascent, Percent }; export class PathText extends createjs.Container { text:string = ""; characterCase:number = txt.Case.NORMAL; ...
the_stack
import { window, commands, workspace } from 'vscode'; import StatusBar from '../utils/statusBarItem'; import Utilities from '../utils/Utilities'; import NpmData from './NpmData'; import getBuildCmnd from '../utils/config/build'; import getInfoCmnd from '../utils/config/info'; import { getServeCmnd, getServePortConfig }...
the_stack
// MIT License // Copyright (c) 2014 Chris McCord // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publ...
the_stack
import { Component, ChangeDetectionStrategy, Injectable, Optional } from '@angular/core'; import { FormControl, FormGroup } from '@angular/forms'; import { FieldWrapper, FormlyFieldConfig } from '@ngx-formly/core'; import { createFieldComponent, FormlyInputModule, createFieldChangesSpy } from '@ngx-formly/core/testing'...
the_stack
import {copyObject, deepCopy, diffArray, partition} from "../util/helpers"; import {ContentEdit} from "../data/content_edit"; import {__getProxyTarget} from "./readonly"; export interface UpdateLike<S> { // Sentinel field so we can distinguish an update from a value isStateUpdate: true // Apply the update...
the_stack
import React from 'react'; import { act } from 'react-dom/test-utils'; import { ComponentRegistryImpl, ComponentRegistry, SlotLocation, AppConfig, IContextKeyService, CommandRegistry, ILoggerManagerClient, ViewContainerOptions, PreferenceService, Disposable, ClientApp, } from '@opensumi/ide-core-...
the_stack
import * as assert from 'assert'; import { ITreeNode, ITreeFilter, TreeVisibility, ITreeElement } from 'vs/base/browser/ui/tree/tree'; import { IndexTreeModel, IIndexTreeNode, IList, IIndexTreeModelSpliceOptions } from 'vs/base/browser/ui/tree/indexTreeModel'; function toList<T>(arr: T[]): IList<T> { return { splic...
the_stack
import {SchematicTestRunner, UnitTestTree} from '@angular-devkit/schematics/testing'; import {addPackageToPackageJson} from '@angular/cdk/schematics/ng-add/package-config'; import {createTestCaseSetup, resolveBazelPath} from '@angular/cdk/schematics/testing'; import {readFileSync} from 'fs'; import {MIGRATION_PATH} fro...
the_stack
import './commands'; import * as path from 'path'; import * as url from 'url'; import { addNotification, azureLoggedInUserChanged, isMac, newNotification, rememberBounds, setOpenUrl, updateNewTunnelInfo, updateTunnelError, updateTunnelStatus, Notification, PersistentSettings, SharedConstants, ...
the_stack
import { EventEmitter } from 'events' import * as rlp from 'rlp' import * as util from '../util' import BufferList = require('bl') import ms from 'ms' import { debug as createDebugLogger } from 'debug' import Common from '@ethereumjs/common' import { ECIES } from './ecies' import { ETH, LES } from '../' import { int2bu...
the_stack
import { player, saveSynergy, blankSave, reloadShit, format } from './Synergism'; import { testing, version } from './Config'; import { getElementById } from './Utility'; import LZString from 'lz-string'; import { achievementaward } from './Achievements'; import { Player } from './types/Synergism'; import { Synergism }...
the_stack
/* eslint-disable @typescript-eslint/class-name-casing */ /* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-empty-interface */ /* eslint-disable @typescript-eslint/no-namespace */ /* eslint-disable no-irregular-whitespace */ import { OAuth2Client, JWT, Compute, User...
the_stack
import { Component } from "@angular/core"; import { RouterExtensions } from "@nativescript/angular"; import { StateTransferService } from "~/app/services/state-transfer.service"; import { ScannedItemManagerService, ScannedItem } from "../services/scanned-item-manager.service"; import { GrocyService } from "~/app/servic...
the_stack
import * as h from '../helpers'; describe('Tabs', () => { before(() => { h.stories.visit(); }); ['Basic', 'Named Tabs'].forEach(story => { context(`given the [Components/Containers/Tabs/React, ${story}] story is rendered`, () => { beforeEach(() => { h.stories.load('Components/Containers/Ta...
the_stack
import {EntityMetadata} from "../metadata/EntityMetadata"; import {MissingPrimaryColumnError} from "../error/MissingPrimaryColumnError"; import {CircularRelationsError} from "../error/CircularRelationsError"; import {DepGraph} from "../util/DepGraph"; import {Driver} from "../driver/Driver"; import {DataTypeNotSupporte...
the_stack
import { OrderErrorCode, AddressTypeEnum, GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; // ================...
the_stack
import * as chalk from "chalk"; import { assert } from "node-opcua-assert"; import { NodeClass, QualifiedNameLike } from "node-opcua-data-model"; import { StructuredTypeSchema } from "node-opcua-factory"; import { AttributeIds } from "node-opcua-data-model"; import { DataValue, DataValueLike } from "node-opcua-data-va...
the_stack
import rule from "../../src/rules/ts-use-interface-parameters"; import { RuleTester } from "eslint"; //------------------------------------------------------------------------------ // Example class & interface //------------------------------------------------------------------------------ const example = `class A {...
the_stack
import { Canvas } from '@antv/g-canvas'; import { Shape, Node, Util } from '@antv/g6-core'; import { Graph, Global } from '../../../src'; import '../../../src'; import { IGroup } from '@antv/g-base'; const { translate } = Util; const div = document.createElement('div'); div.id = 'node-shape'; document.body.appendChild...
the_stack