text stringlengths 3.08k 15.5k |
|---|
import { Session, App, Tables } from 'koishi-core'
import { difference, observe, isInteger, defineProperty, Observed } from 'koishi-utils'
import { RegExpValidator } from 'regexpp'
declare module 'koishi-core' {
interface App {
teachHistory: Record<number, Dialogue>
}
interface EventMap {
'dialogue/perm... |
/*
Copyright 2016-2021 Bowler Hat LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softwar... |
import { CooldownData } from '@lib/interface/mongo/currency/currencyprofile';
import { MessagePlus } from '@lib/extensions/message';
import { Util } from '@lib/utility/util';
import { Lava } from '@lib/Lava';
import {
CommandHandler as AkairoCommandHandler,
Command as AkairoCommand,
DefaultArgumentOptions,
Cons... |
import React, { Component } from 'react';
import styles from './InterlockReputation.module.css';
import splitter from '../StyleModules/Splitter.module.css';
import Tabs from '../Common/Tabs';
enum SkillIPSections {
Learning = "Learning and Improving",
Multipliers = "IP Multipliers",
Getting = "Getting More IP"
}
i... |
import { Position } from '@sourcegraph/extension-api-types'
import { parseQueryAndHash, parseRepoRevision } from '@sourcegraph/shared/src/util/url'
export interface SourcegraphUriOptionals {
revision?: string
path?: string
position?: Position
isDirectory?: boolean
isCommit?: boolean
compareRang... |
<filename>lib/logging.ts
/*
* Copyright © 2021 Atomist, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... |
<filename>src/utils/index.ts
import { ChainId, CurrencyAmount, Percent, Token as SDKToken, TokenAmount, WETH } from "@sushiswap/sdk";
import { ethers } from "ethers";
import { ETH } from "../constants/tokens";
import Token from "../types/Token";
import getContract from "./getContract";
import { Contract } from '@ethers... |
import {ListWrapper, MapWrapper, Map, StringMapWrapper, List} from 'angular2/src/facade/collection';
import {
AST,
Locals,
ChangeDispatcher,
ProtoChangeDetector,
ChangeDetector,
BindingRecord,
DirectiveRecord,
DirectiveIndex,
ChangeDetectorRef
} from 'angular2/change_detection';
import {
ProtoEleme... |
import "@nivinjoseph/n-ext";
import * as Sharp from "sharp";
const loaderUtils = require("loader-utils");
import * as Path from "path";
import { TypeHelper } from "@nivinjoseph/n-util";
const imagemin = require("imagemin");
interface ResizedImage
{
// name: string;
ext: string;
width: number;
height: ... |
<reponame>janarthan35/PerfCascade<gh_stars>1-10
/** Helpers that are not file-fromat specific */
import { isInStatusCodeRange, toCssClass } from "../helpers/misc";
import { escapeHtml, sanitizeAlphaNumeric } from "../helpers/parse";
import { RequestType, SafeKvTuple } from "../typing/waterfall";
import {
Icon,
KvTu... |
<filename>src/exploder.ts
import { join } from 'path'
import {
CodeBlockWriter,
InterfaceDeclaration,
JSDocableNode,
Project,
Type,
TypeGuards,
WriterFunction,
ProjectOptions,
PropertySignature,
ExtendsClauseableNode
} from 'ts-simple-ast'
enum EnumMode {
NAME,
VALUE
}
export class InterfaceEx... |
import React from 'react';
import { MultiSelect, Select } from '@grafana/ui';
// Be sure to include styles at some point, probably during your bootstrapping
import PontusComponent from './PontusComponent';
import Axios from 'axios';
import { SelectableValue } from '@grafana/data';
// import ResizeAware from 'react-res... |
<gh_stars>1-10
import Arweave from 'arweave/node';
import cheerio from 'cheerio';
import { JWKInterface } from 'arweave/node/lib/wallet';
import Transaction, { Tag } from 'arweave/node/lib/transaction';
import { Archive } from '../@types/Archive';
import fetch from 'cross-fetch';
import { ReaderService } from './Reader... |
<filename>src/extend.ts
import {
find,
map,
pipe,
zip,
} from '@fxts/core';
import match from './match';
import type {
Enum,
ExtendedEnum,
ExtendedEnumMapping,
ExtendedEnumStatic,
Keys,
Primitive,
} from './type';
import {
cast,
unsafeCast,
} from './util/cast';
import { toIterable } from './uti... |
import NodeCache from 'node-cache';
import Bottleneck from 'bottleneck';
import { nanoid } from 'nanoid';
import { valveRequestThrottle, cacheConfig, limiterConfig, matchResultLimit } from '../config';
import valveRequest from '../helpers/valveRequest';
import valveStoreRequest from '../helpers/valveStoreRequest';
impo... |
import React, { Component } from 'react'
import classnames from 'classnames'
import debounce from 'debounce'
import seedrandom from 'seedrandom'
import produce from 'immer'
import c from './life.scss'
const LEFT_MOUSE_BUTTON = 1
interface Props {
scale: number
running: boolean
framerate: number
seed?: string,... |
<reponame>RomainMuller/tsc-transform-kit
import { extname, join } from 'path';
import * as ts from 'typescript';
/**
* A compilation watch.
*/
export interface IWatch {
/**
* Interrupts the watch and stops any watch worker.
*/
stop(): void;
}
/**
* @internal
*/
export class Watch implements IWatch {
/... |
import DefaultHandler from './default';
import constants from '../../constants';
import { Asset, Assets, CalculatedChanges } from '../../../types';
const ALLOWED_TRIGGER_IDS = ['credentials-exchange', 'pre-user-registration', 'post-user-registration', 'post-change-password', 'send-phone-message'];
export const exclud... |
import React, { useContext } from 'react';
import { RouteComponentProps } from 'react-router-dom';
import { BreadcumbLink } from '../../Components/BreadcrumbNav';
import { RootContext } from '../../Store/RootStore';
// UTILITIES & SECURITY
import sanitizeHTML, {
defaults as sanitizeHtmlDefaults,
} from 'sanitize-htm... |
/**
* Execute the given `func`tion on the next micro "tick" of the JS engine.
*/
export function defer(func: () => unknown): Promise<unknown> {
// "defer" is used as a semantic label for Promise.resolve().then
return Promise.resolve().then(func)
}
/**
* This is an identity "template string tag function", which wh... |
import { MouseEvent, useEffect, useRef, useState } from "react";
import clsx from "clsx";
import BrightnessIcon from "bootstrap-icons/icons/brightness-high.svg";
import PickColorIcon from "bootstrap-icons/icons/eyedropper.svg";
import { ButtonProps } from "../ui/Button";
import { PinchZoomState } from "../ui/PinchZoom"... |
/* Sorry for this */
import React from 'react'
import "./styles.css";
import {
ResponsiveContainer,
AreaChart,
XAxis,
YAxis,
Area,
} from "recharts";
import Protovol from './Protovol';
import Volume from './Volume';
import Investments from './Investments';
import MCapTVLRatio from './MCapTVLRatio';
import Pr... |
<filename>src/utils.ts
import * as cheerio from 'cheerio';
import * as yaml from 'js-yaml';
import * as parseDomain from 'parse-domain';
import * as readline from 'readline';
import * as _ from 'underscore';
import * as parseUrl from 'url-parse';
import * as wordCount from 'word-count';
import {
Attributes,
Crawled... |
/*
University of Illinois/NCSA Open Source License
Copyright (c) 2018 Terrain Data, Inc. and the authors. All rights reserved.
Developed by: Terrain Data, Inc. and
the individuals who committed the code in this file.
https://github.com/terraindata/terrain
Permission is ... |
<reponame>ffMathy/FluffySpoon.TypeScript.CSharpParser
export interface Scope {
prefix: string;
content: string;
suffix: string;
offset: number;
length: number;
}
export class ScopeHelper {
getStatements(content: string) {
return this.getScopedList(";", content, true);
}
getSco... |
import { parse as parseLink } from 'li';
import { parseUrl as parseQueryString } from 'query-string';
import { camelizeKeys } from 'xcase';
import { BaseResource } from '@gitbeaker/requester-utils';
import { appendFormFromObject, Camelize } from './Utils';
// Request Options
export type IsForm = {
isForm?: boolean;
... |
import {
Component,
ChangeDetectionStrategy,
ChangeDetectorRef,
NgZone,
} from '@angular/core';
import { ActivatedRoute, Router, NavigationEnd } from '@angular/router';
import { FormGroup } from '@angular/forms';
import { inNextTick } from 'ng-zorro-antd/core/util';
import { NzConfigService } from 'ng-zorro-an... |
import * as React from 'react';
import {InjectedTranslateProps} from "react-i18next";
import {Stream, Filter, Watcher, Event as ModelEvent} from "../model";
import {Header, Card, Message, Accordion, Icon, Segment, Divider, Popup} from "semantic-ui-react";
import Event from "./Event";
import {StreamFilterBox} from "./St... |
<reponame>ttamminen/takomo<gh_stars>10-100
import {
CausingEntity,
ChangeSet,
ChangeSetId,
ChangeSetName,
ChangeSetStatus,
ChangeSetStatusReason,
ChangeSource,
ChangeType,
ClientRequestToken,
CloudFormationStack,
DetailedCloudFormationStackSummary,
EnableTerminationProtection,
EvaluationType,
... |
import * as React from 'react';
import { useEffect } from 'react';
import { Slider, InputNumber, Select } from 'antd';
import { Tyr } from 'tyranid/client';
import { mapPropsToForm, onTypeChange } from './type';
import { TyrFilter, FilterDdProps } from '../core/filter';
import { byName, TyrTypeProps } from './type';... |
import { Layout, Meta } from '@/components/layouts'
import { useForm } from 'react-hook-form'
import { Toast } from '../components'
import { ViewIcon, ViewOffIcon } from '@chakra-ui/icons'
import { useRef, useState } from 'react'
import {
Box,
Heading,
Flex,
FormControl,
FormErrorMessage,
FormLabel,
Input... |
<filename>src/ipc/schemas/zod/config.ts
/**
* Copyright (c) 2022
*
* Property Schema for the Configuration Class
* Ensures the correct types of values are used on the config at all times.
*
* Socket Configuration: Configuration for the ICP Socket, used to specify the properties of the socket.
* Network Configur... |
<reponame>japiirainen/guack<filename>packages/types/ext/EffectOption.ts
import * as T from '@effect-ts/core/Effect'
import { pipe, flow } from '@effect-ts/core/Function'
import * as F from '@effect-ts/core/Function'
import * as O from '@effect-ts/core/Option'
import * as OptionT from '@effect-ts/core/OptionT'
import * ... |
<reponame>iam-medvedev/ts-module-browser
/// <reference lib="WebWorker" />
import type { PackageJson } from "type-fest";
import { parsePackageLockJson, parseYarnLockFile } from "./lockfile";
import { getSourceDependencies, transpile } from "./transpiler";
import {
localSearchPath,
log,
normalizeFilePath,
Resolv... |
<reponame>eraizel/Braza<filename>src/i18n.ts
import i18n from "i18next";
import LanguageDetector from "i18next-browser-languagedetector";
import { initReactI18next } from "react-i18next";
const resources = {
en: {
translation: {
placeholder: "Estado ou Território",
guess: "Adivinhe",
share: "Co... |
import {
Span,
TraceAPI,
SpanStatusCode,
ROOT_CONTEXT,
Context,
trace,
SpanContext,
} from "@opentelemetry/api";
import { BasicTracerProvider, Tracer } from "@opentelemetry/sdk-trace-base";
import * as core from "@actions/core";
import {
WorkflowRunJobs,
WorkflowRunJob,
WorkflowRunJobStep,
Workflo... |
<gh_stars>0
import { Selector } from "testcafe";
import { enterPassword, loadConfigFile, configLocal, dataFileJsonCoo, dataFileJsonEbl, dataFileCsvEbl } from "./helper";
fixture("Happy flow").page`http://localhost:3000`;
const FillFormTitle = Selector("[data-testid='fill-form-title']");
const FormSelectionTitle = Sel... |
import {identity, pipe} from 'fp-ts/lib/function';
import * as E from 'fp-ts/lib/Either';
import * as t from 'io-ts';
import {isIntFromString} from './helpers';
/** @internal */
const formatPath = (error: t.ValidationError) => {
// Not sure if its just the case that new versions of io-ts don't define
// _tag ... |
import * as _ from 'lodash';
import { createDefaultFermentable, Fermentable } from './fermentable';
import { createDefaultMash, createDefaultMashStep } from './mash';
import { computeGrainWeight, createRecipe, Recipe, RecipeTypeMap } from './recipe';
import { createDefaultSpice, Spice } from './spice';
import { Style }... |
import { Component, OnInit, Input, Pipe } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { HttpService } from '../../http.service';
import { StorageService } from '../../storage.service';
import { Router } from '@angular/router';
import { DomSanitizer } from '@angular/platform-browser';... |
<filename>server/src/data/repositories/task/task-repository.ts<gh_stars>1-10
import { EntityRepository, SelectQueryBuilder } from 'typeorm';
import { AbstractRepository } from '../abstract';
import { Task } from '../../models';
import { TASK_ORDER_BY, SEARCH_KEYS, SEARCH_FOCUS_KEYS } from '../../../common';
type IWher... |
/*
* Copyright (c) 2015, <NAME>
* All rights reserved. (MIT Licensed)
*
* RGBQuant.js - an image quantization lib
*/
/**
* @preserve TypeScript port:
* Copyright 2015-2018 <NAME>
* All rights reserved. (MIT Licensed)
*
* rgbquant.ts - part of Image Quantization Library
*/
import { Palette } from '../../uti... |
import * as https from 'https';
import * as mongodb from 'mongodb';
import * as asyncJS from 'async';
import * as querystring from 'querystring';
import { BaseDataService } from './BaseDataService';
var config = require('../config.json');
var MongoClient = mongodb.MongoClient;
const PERFORMANCE_QUERY_LIMIT = 100;
... |
<gh_stars>0
import { TaxisTimeline } from './timeline';
type Axis = {
key: string;
beginAt?: number; // TODO: delete
endAt?: number; // TODO: delete
duration: number;
delay: number;
position: string | number;
progress: number;
enter: boolean;
pass: boolean;
};
type Axes = Map<string, Axis>;
type Ti... |
import * as vscode from 'vscode';
import { hasLibPartData } from './extension';
import fs = require('fs');
export class Parameter {
public readonly type : string;
public readonly nameCS : string; // case sensitive
public readonly desc : string;
public readonly defaultvalue : string;
public reado... |
/*
* src/repo-service/model.ts
*
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
*
* Created by <NAME> 12/11/2017
* Copyright (c) 2017 alextanhongpin. All rights reserved.
**/
import * as Bluebird from 'bluebird'
import * as moment from 'moment'
import ... |
import { ChangeDetectorRef, Component, OnDestroy } from '@angular/core';
import { RuntimeService } from '../../services/runtime.service';
import { WidgetsInstanceService } from '../../dashboard/grid/grid.service';
import { WidgetsPropertyService } from '../_common/widgets-property.service';
import { WidgetsBase } from ... |
import {
Component,
OnInit,
ChangeDetectionStrategy,
Input,
ViewChild
} from '@angular/core';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { MatDialog } from '@angular/material/dialog';
import { DataSource } from '@angular/cdk/table';
imp... |
<filename>src/modules/registeration.ts
import puppeteer from 'puppeteer-core';
// @ts-ignore
import {TesseractWorker} from 'tesseract.js';
import {resolve} from 'path';
import {
CLOSED_REG_STRING,
START_MSG_BUTTON_ID,
SECOND_PAGE_NEXT_BUTTON_ID,
navigationDOMWait,
RETRY_PAGE_BUTTON_ID,
navigationIdleWait,
... |
/**
* Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
* with the License. A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or ... |
import 'reflect-metadata';
import { BigNumber as BigNumberJs } from 'bignumber.js';
import { Provider } from '@ethersproject/providers';
import { BigNumber, Contract, PopulatedTransaction, providers, Signer } from 'ethers';
import { ChainId } from '../config';
export interface ContractsFactory {
connect: (address: s... |
<filename>index.ts<gh_stars>0
const PRIME_NUMBERS: Array<number> = [3, 5, 7, 13, 17, 19, 23, 29, 31, 37, 41, 43];
const DISTRIBUTION_ZONES = [
{
"id": 10,
"name": "Eastern England",
"operator": "UK Power Networks"
},
{
"id": 11,
"name": "East Midlands",
"opera... |
<filename>app/src/utils/logic/rulesets/TableState.ts
import { Cell } from "../Cell";
import { Deduction } from "../Deduction";
import { Region } from "../Region";
import { Rule } from "./Rule";
import applyNormalRules from "./normal-rules";
import { applyCellIsEven, applyCellIsOdd } from "./parity-rule";
export interf... |
export const subjects = [
'<NAME>',
'baby',
'bear',
'bird',
'boy',
'brother',
'chicken',
'children',
'corn',
'cow',
'cat',
'dog',
'doll',
'doctor',
'door',
'duck',
'farmer',
'father',
'fish',
'ghost',
'girl',
'ground',
'horse',
'kangaroo',
'kitty',
'lawyer',
'leathe... |
import { numeric_tones, PinyinRegexp, valid_phone } from '@wohui/pinyin'
import * as request from 'superagent'
import { AzureApp, Env, Gender } from '../env'
const ChineseRegexp = /[\u3400-\u4DBF\u4e00-\u9fa5]/
let env: Env['azure']
export namespace Azure {
export function init(_env: Env['azure']) {
env = _en... |
<filename>console/test.ts
///<reference path="../bower_components/DefinitelyTyped/async/async.d.ts" />
import fs = require('fs');
import Unmarshaller = require('../src/unmarshal');
import Interpreter = require('../src/interpreter');
import async = require('async');
import domain = require('domain');
var testOut: strin... |
<reponame>PROTEUS-H2020/proteus-graphs
import Component from './Component';
import XAxis from './XAxis';
import YAxis from './YAxis';
import Globals from '../../Globals';
import {
map,
select,
area,
nest,
CurveFactory,
Area,
easeLinear
} from 'd3';
class ConfidenceBand extends Component {
... |
import { Observer, Observable } from 'rxjs';
import { filter } from 'rxjs/operators';
import { Collection, OrderedSet, getIn } from 'immutable';
import { struct } from '../reference/struct';
import { toKeyPathSeq } from '../utils/keypath';
import { isDispatching, ImmduxInternalError } from '../reference/status';
im... |
let _ = require('lodash');
let async = require('async');
let moment = require('moment');
import { ConfigParams, IdGenerator } from 'pip-services3-commons-node';
import { IConfigurable } from 'pip-services3-commons-node';
import { IReferences } from 'pip-services3-commons-node';
import { Descriptor } from 'pip-services... |
<filename>src/shared/game/GameParser.ts
import { IRawAdditionalApplicationInfo, IRawGameInfo, IRawPlatformFile } from '../platform/interfaces';
import { IAdditionalApplicationInfo, IGameCollection, IGameInfo } from './interfaces';
export class GameParser {
public static parse(data: IRawPlatformFile, filename: string... |
<reponame>stasson/standard-commit
import { CommitMessage } from './commitmsg'
import { formatHeader } from './formatmsg'
import { Config, DefaultConfig } from './config'
import { suggestScopes } from './scopes'
import { prompt } from 'enquirer'
import SuggestPrompt from './suggest-prompt'
import { loadOptions, validate... |
import { escapeRegExp, substringBefore } from './utils'
import { CurrencyDisplay, CurrencyFormatOptions } from './api'
export const DECIMAL_SEPARATORS = [',', '.', '٫']
export const INTEGER_PATTERN = '(0|[1-9]\\d*)'
export default class CurrencyFormat {
options: Intl.NumberFormatOptions
locale?: string
currency... |
"use strict";
import "node_modules/dc/dc.min.css";
import {
AbstractChartViewModelBase,
IAbstractChartBase,
IAbstractChartViewModelBase
} from "../abstract-chart-view-model-base";
import { IChartManager } from "../chart-manager";
import { IMetric } from "../../crossfilter-manager/key-metric-ma... |
import React, { Component } from 'react'
import { Text, View, Image, ImageBackground, FlatList, ScrollView } from 'react-native'
import { getPokemon } from '../../util/api'
import { getComponentStyle } from '../../Helpers/Stylus'
import { paddingNumber } from '../../Helpers/Tools'
import { ColorType } from '../../Helpe... |
<reponame>giscafer/ngx-amap<gh_stars>1-10
import { Directive, Input, Output, OnDestroy,
EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
import { Subscription } from 'rxjs';
import { BezierCurve, Map, Bounds } from '../../types/class';
import { BezierCurveOptions } from '../../types/interface';
import {... |
/*
* Copyright 2021 Spotify AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... |
<filename>src/find-mats.ts
/** @hidden */
declare var _debug_: Debug;
import { LlRbTree } from 'flo-ll-rb-tree';
import { simplifyPaths } from 'flo-boolean';
import { Debug } from './debug/debug.js';
import { CpNode } from './cp-node.js';
import { Loop } from './loop.js';
import { Mat } from './mat.js';
import { find... |
/* tslint:disable max-classes-per-file */
import { IList } from "./IList";
class Node<T> {
public x: T;
public prev: Node<T>;
public next: Node<T>;
}
export class DLList<T> implements IList<T> {
public static merge<T>(l1: DLList<T>, l2: DLList<T>): DLList<T> {
const merged = new DLList<T>();
while (l1... |
import notAuthSVG from "@/assets/svg/notAuth.svg";
import { openTopicPostFuncModal } from "@/forum/components/TopicPostModal";
import {
ITopicDto,
TopicListQuery,
TopicSingleStore,
} from "@/forum/stores/TopicStore";
import HomepageProfile from "@/home/components/HomepageProfile";
import { Select } from "@/lib/an... |
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
import axios from 'axios';
import AuthFactory from './auth/AuthFactory';
import { IAuthService } from './auth/types';
import {
AuthTypes,
BitloopsConfig,
BitloopsUser,
IBitloopsAuthenticationOptions,
Unsubscribe,
IInternalStorage,
} from './definitions';
import { isTokenExpired } from './helpers';
import HT... |
import { ShaderArtPlugin } from '@shader-art/plugin-base';
import { TexturePlugin, TexturePluginFactory } from './index';
import { ShaderArtShim } from './test-utils/shader-art-shim';
function wait(timeout = 0): Promise<void> {
return new Promise((resolve) => {
setTimeout(() => {
resolve();
}, timeout)... |
// Controller common imports
import { expressTypes, localsTypes } from '../../../types/index'
import { HttpStatusCode } from '../../../utils/http-status-codes'
import { logger } from '../../../utils/logger'
import { responseBuilder } from '../../../utils/response-builder'
import { errorHandler } from '../../../utils/er... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
/// <reference path="../src/typings/node.d.ts" />
/// <reference path="../src/typings/Q.d.ts" />
/// <reference path="../src/typings/del.d.ts" />
/// <reference path="../src... |
import React, { VFC } from 'react';
import { Color, G, Path } from 'react-native-svg';
import { createIcon } from '../helpers';
type BrokenProps = { color: Color, strokeWidth: number, };
type CurvedProps = { color: Color, strokeWidth: number, };
type DuotoneProps = { color: Color, strokeWidth: number, };
type O... |
<reponame>licg9999/wuzzle
import glob from 'glob';
import path from 'path';
import shelljs from 'shelljs';
import { concatEnvPath, genEndToEndExec } from '../utils';
export interface TestCase {
fixtureDir: string;
command: string;
envOverrides?: Record<string, string>;
outputDir?: string;
outputContents?: Re... |
// process.env.SQL_LOG = '1';
import { suite, test } from '@testdeck/mocha';
import { expect } from 'chai';
import { Bootstrap, ICommand } from '../../../src';
import { Config } from '@allgemein/config';
import { join } from 'path';
import { hostname } from 'os';
import { keys, uniqBy } from 'lodash';
import { ConfigOu... |
<reponame>puckey/detect-gpu
// Vendor
import puppeteer from 'puppeteer';
import fs from 'fs';
// Application
import { getGPUVersion } from '../src/internal/getGPUVersion';
const BENCHMARK_URL = `https://gfxbench.com/result.jsp?benchmark=gfx50&test=544&text-filter=&order=median&ff-lmobile=true&ff-smobile=true&os-Andro... |
<filename>lyts_chrome_extension/application/chrome/Tabs.ts
import ly from "../../../lyts/lyts_core/ly";
import BaseObject from "../../../lyts/lyts_core/commons/BaseObject";
import Tab = chrome.tabs.Tab;
import InjectDetails = chrome.tabs.InjectDetails;
import HighlightInfo = chrome.tabs.HighlightInfo;
import TabRe... |
import Select from 'components/Select';
import dayjs from 'dayjs';
import LocalizedFormat from 'dayjs/plugin/localizedFormat';
import * as React from 'react';
import { FormattedMessage, useIntl } from 'react-intl';
import { ValueType } from 'react-select/lib/types';
import { AuditResultType } from 'redux/auditResults/t... |
<reponame>suntopo/open-app
import { isimToken, isZh, isUnSupportScheme, isAndroid, openByIframe, openByLocation, isiOS, isChrome, openByTagA, isiPhoneX } from './utils'
interface Props {
schemeUrl?: string
fallbackUrl?: string
buttonStyle?: any
buttonText?: string
timeout?: number
}
const buttonStyle = {
... |
const msWordIcons = {
alignCenter: {
alt: "Align center",
src: require("@/assets/ms_word_icons/align_center.png"),
},
alignLeft: {
alt: "Align left",
src: require("@/assets/ms_word_icons/align_left.png"),
},
alignRight: {
alt: "Align right",
src: require("@/assets/ms_word_icons/align_r... |
<filename>packages/ambient-stack/src/identity.ts<gh_stars>1-10
import { debug } from "debug";
import { ChainTree, EcdsaKey, setDataTransaction, setOwnershipTransaction, Tupelo, Community } from "tupelo-wasm-sdk";
import { EventEmitter } from "events";
import {getAppCommunity} from './community';
const log = debug("ide... |
<reponame>stevkan/botbuilder-js<gh_stars>0
/**
* @module botbuilder-ai
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import {
ArrayExpression,
ArrayExpressionConverter,
BoolExpression,
BoolExpressionConverter,
Expression,
StringExpre... |
import React from 'react'
import styled from 'styled-components'
import { useDispatch } from "react-redux"
import { useHistory } from "react-router-dom"
import * as actions from '../../actions'
import { createStyles, makeStyles, Theme } from '@material-ui/core/styles'
import { SexTypes } from "../../class/User"
co... |
<reponame>framp/PathFinding.ts
import Node from "./Node";
import Grid from "./Node";
/**
* Backtrace according to the parent records and return the path.
* (including both start and end nodes)
* @param {Node} node End node
* @return {Array.<Array.<number>>} the path
*/
function backtrace(node: Node): Array<Array<n... |
import * as React from 'react';
import * as THREE from 'three';
import {map, filter, concat, isFunction, isEmpty, times} from 'lodash';
import DebugData from '../../../DebugData';
import {CustomValue, Value} from './Value';
import {RootSym, applyFunction, isPureFunc} from './utils';
import {getParamNames} from '../../.... |
<filename>src/lib/stellar.ts
import BigNumber from "big.js"
import fetch from "isomorphic-fetch"
import { xdr, Asset, Horizon, Keypair, NotFoundError, Server, ServerApi, Transaction } from "stellar-sdk"
import { AssetRecord } from "../hooks/stellar-ecosystem"
import { AccountData } from "./account"
import { joinURL } f... |
<reponame>louis-tru/somes
/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2015, xuewen.chu
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* ... |
<filename>src/configuration/configuration-base.ts
import { isAbsolute, extname } from 'path';
import debug from 'debug';
import JSON5 from 'json5';
import {
castArray,
cloneDeep,
isPlainObject,
mergeWith,
} from 'lodash';
import { stat, readFile } from '../utils/promisified-functions';
import Option fr... |
<reponame>asaichi2017/draken-sdk
import axios from 'axios'
import { ApiClient } from './client'
type ContentQuality = 'low' | 'default' | 'medium' | 'high' | 'highest'
type ContentPrivacy = 'public' | 'private' | 'restricted'
// enum ContentPrivacy {
// PUBLIC = 'public',
// PRIVATE = 'private',
// RESTRICTED =... |
import React from 'react';
import { shallow } from 'enzyme';
import DataToolbarComponent from '../DataToolbarComponent';
import { ProcessInstanceState } from '../../../../graphql/types';
const initData = {
ProcessInstances: [
{
id: '8035b580-6ae4-4aa8-9ec0-e18e19809e0b',
processId: 'travels',
p... |
<filename>src/services/authenticate.ts<gh_stars>0
import {NextFunction, Request, Response} from 'express';
import {ClientBase} from 'pg';
import {Logger} from 'winston';
import {Configuration} from '../index';
import {Model, ModelDao} from '../models/repository/ModelDao';
import {ModelRepository} from '../models/reposi... |
<filename>src/caching/caching.dropPickupCacher.ts
import { CreepRole } from "enums/enum.roles";
import _ from "lodash";
import { buildProjectCreator } from "building/building.buildProjectCreator";
import { CreepQualifiesAsActive } from "./caching.creepCaching";
export function getdropMapPosition(creep: Creep): { x: nu... |
<reponame>sudipghimire533/frontier-substrate-synced<filename>ts-tests/tests/util.ts
import Web3 from "web3";
import { ethers } from "ethers";
import { JsonRpcResponse } from "web3-core-helpers";
import { spawn, ChildProcess } from "child_process";
export const PORT = 19931;
export const RPC_PORT = 19932;
export const ... |
import {
EmptyState,
EmptyStateBody,
EmptyStateIcon,
Grid,
GridItem,
TabContent,
Title,
TitleSizes,
} from '@patternfly/react-core';
import { ErrorCircleOIcon } from '@patternfly/react-icons/dist/esm/icons/error-circle-o-icon';
import Main from '@redhat-cloud-services/frontend-components/Main';
import P... |
<gh_stars>1-10
import * as i18n from './index';
const supportedLocales = ['tr-TR', 'en-US'];
const trTR = {
engin: '',
'{{count}} engin_0': 'hic engin',
'{{count}} engin_1': 'tek engin',
'{{count}} engin_2': 'iki engin',
'{{count}} engin_3': '{{count}} engin',
'{{count}} engin_4': '{{count}} engin',
'{{... |
import * as React from 'react';
import clsx from 'clsx';
import { useAutoControlledValue, useForkRef } from '@appbuckets/react-ui-core';
import ReactInputMask from 'react-input-mask';
import TextareaAutosize from 'react-textarea-autosize';
import { UIVoidComponent } from '../generic';
import { useSharedClassName, u... |
<reponame>ShafSpecs/remix-pwa
/// <reference lib="WebWorker" />
import { json } from "@remix-run/server-runtime";
export type {};
declare let self: ServiceWorkerGlobalScope;
const STATIC_ASSETS = ["/build/", "/icons/", "/"];
const ASSET_CACHE = "asset-cache";
const DATA_CACHE = "data-cache";
const DOCUMENT_CACHE = ... |
import { useContext } from "react"
import { JDClient } from "../../../jacdac-ts/src/jdom/client"
import { CHANGE, CONNECT } from "../../../jacdac-ts/src/jdom/constants"
import { inIFrame } from "../../../jacdac-ts/src/jdom/iframeclient"
import JacdacContext, { JacdacContextProps } from "../../jacdac/Context"
import use... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.