text stringlengths 3.08k 15.5k |
|---|
/* eslint-disable @typescript-eslint/naming-convention */
import type { BanState } from "../../../core/card/banlist/BanState";
import { DefaultBanState } from "../../../core/card/banlist/BanState";
import type { CardImage } from "../../../core/card/CardImage";
import type { CardPrices } from "../../../core/card/CardPr... |
import sleep from 'sleep-promise'
import { execCmdWithExitOnFailure } from 'src/lib/cmd-utils'
import { retryCmd } from 'src/lib/utils'
import { AksClusterConfig } from './k8s-cluster/aks'
/**
* getIdentity gets basic info on an existing identity. If the identity doesn't
* exist, undefined is returned
*/
export asy... |
import {
common,
crypto,
scriptHashToAddress,
SmartContractNetworksDefinition,
SourceMaps,
} from '@neo-one/client-common';
import { NEOONEDataProvider } from '@neo-one/client-core';
import { constants, deployContract, setupWallets } from '@neo-one/local';
import { JSONRPCLocalProvider } from '@neo-one/node-b... |
import React from 'react';
import { Row, Col, Card, PageHeader, Avatar, Layout, Spin, Alert } from 'antd';
import { GithubFilled, TwitterSquareFilled } from '@ant-design/icons';
import { RouteComponentProps } from 'react-router-dom';
import { LEAGUES } from 'configs/LeagueConstants';
import { RedditIcon, RedditShareBu... |
import * as path from 'path';
import * as protobufjs from 'protobufjs';
// Equivalent of running node with --expose-gc
// but easier to write tooling since we don't need to inject that arg to
// nodejs_binary
if (typeof global.gc !== 'function') {
// tslint:disable-next-line:no-require-imports
require('v8').setFla... |
<reponame>CiaccoDavide/DefinitelyTyped<filename>types/hubot/index.d.ts
// Type definitions for hubot 3.3
// Project: https://github.com/hubotio/hubot
// Definitions by: <NAME> <https://github.com/dirk>
// <NAME> <https://github.com/KeesCBakker>
// <NAME> <https://github.com/eeemil>
// ... |
import type { Biome, SpaceType } from './game_types';
import type { ArtifactId, EthAddress, LocationId } from './identifier';
import type { PlanetMessage } from './planetmessage';
import { TransactionCollection } from './transaction';
import type { Upgrade, UpgradeState } from './upgrade';
import type { Abstract } from... |
<reponame>RigoBlock/rigoblock-monorepo
import Web3 = require('web3')
import {
CONTRACT_ADDRESSES,
DECIMAL_PLACES,
EFX_TOKENS_LIST,
POOL_DECIMALS
} from '../../constants'
import { NETWORKS, supportedExchanges } from '@rgbk/exchange-connector'
import { postJSON, toBn, toUnitAmount } from '../../utils'
import exch... |
import { parseAttr } from '../parser/attr-parser';
import { isSelectorMatchDom, selectorToArr, walkDomSelector } from '../utils/index';
export class StyleNode {
dom = null;
style = null;
children = [];
originChildren = [];
}
const defaultStyle = {
'font-family': 'serif',
};
const inheritAttr = [
'font',
... |
/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
import {AttributePart, html, render} from '../../lit-html.js';
import {directive} from '../../directive.js';
import {StyleInfo, styleMap} from '../../directives/style-map.js';
import {assert} from '@esm-bundle/chai';
const ua = ... |
import React, { useMemo, DOMElement, useEffect } from 'react';
import useDataApi from 'frontend/hooks/use-data-api';
import api from 'frontend/lib/api';
import { useSelector, useDispatch, batch } from 'react-redux';
import TabbedView, { TabsWrapperProps } from 'frontend/components/TabbedView';
import { Data } from 'fro... |
<filename>packages/github/src/helpers/config.ts
import {DiffInterceptor} from './diff';
import {isNil} from './utils';
export type Endpoint =
| string
| {
url: string;
method?: 'get' | 'GET' | 'post' | 'POST';
headers?: {
[name: string]: string;
};
};
export interface SchemaPoi... |
import * as _ from 'lodash'
import * as fs from 'fs';
import {JSONResult, config, frameworks, FrameworkData} from './common'
import {BenchmarkType, Benchmark, benchmarks} from './benchmarks'
const dots = require('dot').process({
path: './'
});
let frameworkMap = new Map<string, FrameworkData>();
frameworks.map(f => ... |
import * as t from 'io-ts';
import { Entities } from 'nova_ecs/arg_types';
import { EntityMap } from 'nova_ecs/entity_map';
import { Component } from '../component';
import { Angle, AngleType } from '../datatypes/angle';
import { Position, PositionType } from '../datatypes/position';
import { VectorType } from '../data... |
<filename>lib/auth/password/action_authenticate/x_preact/authenticate_password.ts
import { h, VNode } from "preact"
import { useLayoutEffect } from "preact/hooks"
import { html } from "htm/preact"
import {
useApplicationAction,
useApplicationView,
} from "../../../../z_vendor/getto-application/action/x_preact/... |
<gh_stars>10-100
'use strict';
import cheerio = require('cheerio');
import fs = require('fs');
import mkdirp = require('mkdirp');
import request = require('./request');
import path = require('path');
import subtitle from './subtitle/index';
import video from './video/index';
import xml2js = require('xml2js');
/**
* S... |
import * as React from "react";
import { Dispatch } from "redux";
import { connect } from "react-redux";
import { Link } from "react-router-dom";
import Moment from "react-moment";
import debounce from "lodash/debounce";
import {
PageSection,
PageSectionVariants,
Title,
Pagination,
EmptyState,
EmptyStateVar... |
/**
* Mollie https://www.mollie.nl
*
* @author <NAME>. <<EMAIL>>
* @copyright Mollie B.V.
* @link https://github.com/mollie/PrestaShop
* @license https://github.com/mollie/PrestaShop/blob/master/LICENSE.md
* @codingStandardsIgnoreStart
*/
import React, { ReactElement, useEffect } from 'r... |
import {
AbstractGrant,
ClientCredentials,
GrantInterface,
GrantOptions,
GrantServices,
} from "./grant.ts";
import {
InvalidClientError,
InvalidGrantError,
InvalidRequestError,
ServerError,
} from "../errors.ts";
import { Token } from "../models/token.ts";
import { OAuth2Request } from "../context.ts... |
import React from 'react';
import styled from '@emotion/styled';
import classnames from 'classnames';
// import { transparentize } from 'polished';
import {
LocalizeProps,
LocalizeThemeProps,
LocalizeIntentThemeType,
LocalizeScale,
getLocalizeScaleBy,
} from '@seolhun/localize-components-styled-types';
impo... |
import htmlTags from 'html-tags'
import voidHtmlTags from 'html-tags/void'
/**
* List of tags having optional closing tag
*/
const optionalVoidHtmlTags = [
'li',
]
const { min, max } = Math
class HtmlSubstringError extends Error {}
interface Options {
breakWords: boolean
suffix: (() => string) | string | nu... |
import * as React from 'react';
import * as events from 'add-event-listener';
import * as ReactDOM from 'react-dom';
import LayoutEvents from '../../lib/LayoutEvents';
import RenderContainer from '../RenderContainer/RenderContainer';
import ZIndex from '../ZIndex/ZIndex';
import stopPropagation from '../../lib/events/s... |
<gh_stars>0
import {NgModule,Component,ElementRef,AfterViewInit,OnChanges,Input,forwardRef,EventEmitter,Output} from '@angular/core';
import {CommonModule} from '@angular/common';
import {NG_VALUE_ACCESSOR,ControlValueAccessor} from '@angular/forms';
import {DomHandler} from '../dom/domhandler';
export const INPUTSWIT... |
import { useMemo, useCallback } from 'react';
import * as React from 'react';
import { EditMode } from './MapControls'; // TODO remove it from there entirely and prune some?
import { IAnnotation } from '../data/annotation';
import { ITokenProperties } from '../data/feature';
import { IMapImageProperties } from '../dat... |
<reponame>0b10/lumberjack
import fc from "fast-check";
import _ from "lodash";
import { isValidMessageLevel, isValidErrorLevel } from "../../../../../lib/helpers";
import { validateMergedTemplate } from "../../../../../lib/preconditions";
import { LumberjackValidationError } from "../../../../../error";
import { Templ... |
<filename>Restaurant/src/app/services/auth.service.ts
import { HttpClient, HttpErrorResponse } from "@angular/common/http";
import { Injectable } from "@angular/core";
import { Router } from "@angular/router";
import { BehaviorSubject, throwError } from "rxjs";
import { catchError, tap } from "rxjs/operators";
import {... |
import React, { useState, useEffect } from 'react';
import { connect } from 'react-redux';
import { Link, RouteComponentProps } from 'react-router-dom';
import { Button, Row, Col, Label } from 'reactstrap';
import { AvFeedback, AvForm, AvGroup, AvInput, AvField } from 'availity-reactstrap-validation';
import { translat... |
/***********************************************************
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License
**********************************************************/
import * as React from 'react';
import { useTranslation } from 'react-i18next';
import { Label, Stack, ... |
<filename>packages/base/src/Stream/GroupBy.ts
import * as HM from '../collection/immutable/HashMap'
import { pipe } from '../function'
import * as F from '../Future'
import * as I from '../IO'
import * as Ex from '../IO/Exit'
import * as Ma from '../Managed'
import * as M from '../Maybe'
import * as Q from '../Queue'
i... |
const caselessReplacements = [
["person", "goose"],
["people", "geese"],
["troops", "geese"],
["men", "gander"],
["males", "gander"],
["man", "gander"],
["male", "gander"],
["women", "geese"],
["females", "geese"],
["woman", "goose"],
["female", "goose"],
["science", "goo... |
import assert from 'assert';
import { PriceFetcher, TradesFetcher, Trade } from './types';
// weight for each group [0-5min, 5-10min, 10-15min, 15-20min, 20-25min, >25min]
const weights = [1, 0.8, 0.6, 0.4, 0.2, 0.001];
// timeframe to group trades
const timeframe = 5 * 60 * 1_000; // 5min
// Any trade older than 25... |
<filename>src/backend/connection/clients.ts
import Server from './server'
import ws from 'ws'
import { EventEmitter } from 'events'
import _ from 'lodash'
import { ConfigHandler } from '../config/config'
import { OMIT_CLIENT_CONFIG } from '../constants'
import uuid from 'uuid'
import { Message } from '~common/remote/me... |
import { SvgCmdData, ArcReplace, CommandMap, ConvertArgsData, ArcToLineArgs } from './svg-to-graphics-types';
import { map as cmdMap } from './command-map';
let x: number;
let y: number;
let arcToLinesArgsArr: ArcToLineArgs[];
let arcReplace: ArcReplace;
let prevQArgs: number[];
let prevCArgs: number[];
const toOneDe... |
<filename>src/__tests__/HasOne.test.ts
import neo4js, {
Model,
ModelInstance,
model,
relation,
hasMany,
hasOne,
StringProperty,
NumberProperty,
HasManyActions,
HasOneActions,
} from "../index";
type PersonProps = {
name: string;
};
type TaskProps = {
title: string;
done?: boolean;
};
class ... |
import * as ajv from 'ajv';
import { Event, ErrorEvent } from 'hint/dist/src/lib/types/events';
/** Valid values for the `JSX` compiler option. */
export enum TypeScriptJSXEnum {
preserve = 'preserve',
react = 'react',
reactNative = 'react-native'
}
/** Valid values for the `lib` compiler option. */
expo... |
<reponame>krassowski/jupyterlab-go-to-definition<filename>src/index.ts
import { JupyterFrontEnd, JupyterFrontEndPlugin } from '@jupyterlab/application';
import { ICommandPalette } from "@jupyterlab/apputils";
import { INotebookTracker } from "@jupyterlab/notebook";
import { CodeMirrorEditor } from '@jupyterlab/codemirr... |
import * as url from 'url'
import * as path from 'path'
import { autoUpdater, BrowserWindow, App, Event } from 'electron'
import { autoUpdater as electronUpdater } from 'electron-updater'
import { IS_MACOS, IS_LINUX } from './util'
import { IS_DEVELOPMENT, IS_PRODUCTION, IS_TEST } from '../common/config'
import { trade... |
<reponame>ghuntley/sdk-typescript-1
// Modified from: https://github.com/vercel/next.js/blob/2425f4703c4c6164cecfdb6aa8f80046213f0cc6/packages/create-next-app/index.ts
import chalk from 'chalk';
import dedent from 'dedent';
import { Command } from 'commander';
import path from 'path';
import prompts from 'prompts';
imp... |
<reponame>ahui2016/Mima
// 采用受 Mithril 启发的基于 jQuery 实现的极简框架 https://github.com/ahui2016/mj.js
import { mjElement, mjComponent, m, cc, span } from "./mj.js";
import * as util from "./util.js";
const Alerts = util.CreateAlerts();
const Loading = util.CreateLoading();
const footerElem = util.CreateFooter();
const NaviBa... |
<reponame>RupertBarrow/qsf-le-lanceur
/* eslint-disable no-await-in-loop */
import moment from 'moment';
import logger from 'heroku-logger';
import {
redis,
getDeleteQueueSize,
orgDeleteExchange,
getHerokuCDSs,
getAppNamesFromHerokuCDSs,
// getKeysForCDSs,
cdsRetrieve,
cdsDelete,
ge... |
import { IFavicon, IMods, IMotd, IPlayers, IRawResult, IResult, IText, IVersion } from './interfaces';
const colors = new Map<IText['color'], string>([
['black', '0'],
['dark_blue', '1'],
['dark_green', '2'],
['dark_aqua', '3'],
['dark_red', '4'],
['dark_purple', '5'],
['gold', '6'],
['... |
<reponame>inverted-capital/rxdb
import type { ChangeEvent } from 'event-reduce-js';
import { Observable, Subject } from 'rxjs';
import type {
BulkWriteLocalRow,
DexieSettings,
DexieStorageInternals,
EventBulk,
RxKeyObjectStorageInstanceCreationParams,
RxLocalDocumentData,
RxLocalStorageBulkW... |
<reponame>Hammster/html-element-to-image
export interface ICaptureOptions {
targetNode: HTMLElement | Element
excludedNodes: HTMLElement[] | Element[]
customStyle: string
returnType: string
}
export interface IDirections {
top: number
right: number
bottom: number
left: number... |
<filename>packages/nools/src/nodes/from-node.ts<gh_stars>0
import { isArray, isEmpty } from "@nools/lodash-port";
import { Context } from "../context";
import { IFromNode } from "../runtime/nodes/types";
import { INode, INodeWithPatterns } from "../runtime/nodes/INode";
import { FactObject, WorkingMemory } from "../Wor... |
import React from 'react';
import { useHistory } from 'react-router-dom';
import { Link, NavLink } from 'react-router-dom';
import { Button, Header } from 'semantic-ui-react';
import { useLedger, useParty } from '@daml/react';
import { AssetDeposit } from '@daml.js/da-marketplace/lib/DA/Finance/Asset';
import { Role ... |
<filename>src/mixins/RunnerDriven.ts
import { List } from "../List";
import { Runner, RunnerAction } from "../Runner/index";
import combineGeneratorFunctions from "../utils/combineGeneratorFunctions";
import { GConstructor } from "./common";
type ChildContainable = GConstructor<{
children?: any[];
}>;
/**
* Runner... |
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may... |
<gh_stars>0
import { humanReadableDate } from '@/helpers'
import { ONLINE, OFFLINE, PARTIALLY_DEGRADED } from '@/consts'
import { satisfies } from 'semver'
import Kuma from '@/services/kuma'
/*
dpTags takes a Dataplane received from backend and construct the list of tags in form of array of objects with label and valu... |
<reponame>bcgov/MOH-Pad<filename>msp/src/app/models/base.component.ts
import {ChangeDetectorRef, DoCheck, EventEmitter,
Output, QueryList, SimpleChanges, Optional, OnInit} from '@angular/core';
import { Subscription } from 'rxjs';
import {NgForm} from '@angular/forms';
import {UUID} from 'angular2-uuid';
import {Proc... |
import { ETHER } from "../utils/Currency";
import { tradeMaximumAmountIn, tradeMinimumAmountOut } from "./trade";
import {
ChainId,
Ethereum_Query,
getChainIdKey,
Input_estimateGas,
Input_swapCallParameters,
Input_execCallStatic,
SwapParameters,
TradeType,
TxOverrides,
Ethereum_StaticTxResult,
} fro... |
/* eslint-disable no-prototype-builtins */
import type { PromiseOr} from '../lib/types'
import { readdir } from 'fs/promises'
import { resolve } from 'path';
import merge from 'lodash.merge';
import globrex from 'globrex'
import {deepEqual} from 'assert'
export const deepEq = (a:unknown, e:unknown):boolean => {
try {... |
import countapi from "countapi-js";
import { Page } from "playwright";
import { Module } from "../_module";
import { goto } from "../utils";
export default {
name: "簽到",
description: "簽到模組",
async run({ page, shared, params, logger }) {
if (!shared.flags.logged) throw new Error("使用者未登入,無法簽到");
... |
<gh_stars>0
import { useEffect, useRef, useMemo } from 'react';
import { ScrollViewProps, ViewStyle, StyleSheet, Animated } from 'react-native';
type AnimationConfig = { animated?: boolean };
type CollapsibleHeaderViewProps<T extends ScrollViewProps> = T & {
readonly headerHeight: number;
readonly statusBarHeight... |
<gh_stars>0
import {
HassEntity as HomeAssistantEntity,
HassServices,
} from 'home-assistant-js-websocket';
import merge from 'lodash.merge';
import { Node } from 'node-red';
import { HA_EVENT_SERVICES_UPDATED, INTEGRATION_NOT_LOADED } from '../../const';
import { RED } from '../../globals';
import Comms from ... |
import {
API,
FileInfo,
Options,
JSXElement,
JSXAttribute,
JSXSpreadAttribute,
JSXMemberExpression,
JSXExpressionContainer,
MemberExpression,
Identifier,
ConditionalExpression,
BooleanLiteral,
} from 'jscodeshift';
import {getImportRenameMap} from './utils/getImportRenameMap';
function filterD... |
import { camelCase } from "lodash-es";
import { i18n } from "@/i18n";
import { _warframeData, _abilityData, WarframeFunction } from "./warframe.data";
import { AbilityData, WarframeData } from "./warframe.i";
const defaultLvlUps: [string, number][] = [["h", 200], ["e", 50], ["s", 200]];
/** 战甲 */
export class Warfram... |
import * as discord from 'discord.js'
import { Wit, log, MessageResponse } from 'node-wit'
import * as moment from 'moment'
import * as config from './config.json'
import { Database, Reminder } from './database'
// accesses Wit API
const witClient = new Wit({
accessToken: config.wit_token,
logger: new log.Logger(log... |
import React from "react";
const IconSampleFigure = () => {
return (
<svg width="93" height="83" viewBox="0 0 93 83" fill="none">
<circle cx="46.1846" cy="41.6365" r="32.5" stroke="#3867FA" strokeWidth="3" strokeLinecap="round" strokeDasharray="0.1 10"/>
<circle cx="46.1846" cy="41.6365" r="32.5"... |
import { Project } from "../model/Project/Project";
import { Folder } from "../model/Folder/Folder";
const moment = require("moment");
//import nodeArchiver = require("archiver");
import * as nodeArchiver from "archiver";
import * as fs from "fs";
import { FieldType, Field } from "../model/field/Field";
import {... |
<reponame>rayfoss/ansicolor<gh_stars>10-100
export declare interface ParsedColor {
name?: string;
bright?: boolean;
dim?: boolean;
}
export declare interface ParsedSpan {
text: string;
css: string;
italic?: boolean;
bold?: boolean;
color?: ParsedColor;
bgColor?: ParsedColor;
}... |
<filename>src/discovery.ts
import * as debugPackage from "debug";
import * as dgram from "dgram";
import { EventEmitter } from "events";
import { getBroadcastAddresses, GHomaOptions, wait } from "./lib";
const debug = debugPackage("g-homa:discovery");
const preambleCode = 0;
const preambleTimeout = 10;
const preamble... |
import {
GuildData,
ManagerEvents,
Options,
StreamData,
StreamerObject,
} from "../types";
import { StreamersManager } from "./StreamersManager";
import { DBManager } from "./DBManager";
import { TypedEmitter } from "tiny-typed-emitter";
import { Job } from "./Job";
import { KeyManager } from "./KeyManager";
... |
/**
@license
Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http:/... |
import * as React from "react";
import IGraphBotProps from "./IGraphBotProps";
import { ActionButton } from "office-ui-fabric-react/lib/Button";
import { Panel, PanelType } from "office-ui-fabric-react/lib/Panel";
import { Spinner, SpinnerSize} from "office-ui-fabric-react/lib/spinner";
import { Overlay } from "offic... |
import {GroupProfile, UserProfile} from "../../vkfox/common/users/types";
import {media, PhotoItem, PostItem, VideoItem} from "./newsfeed";
import {LikesObj, UserLikesObj} from "./objects";
import {GenericRS} from "./index";
import {NewsLikesObj} from "../../vkfox/common/feedbacks/types";
import {Attachment} from "./at... |
<gh_stars>10-100
import { orderBy, zipObject } from 'lodash-es'
type JWT = string;
const NORMAL_TO_SUPERSCRIPT = zipObject('0123456789+-', '⁰¹²³⁴⁵⁶⁷⁸⁹⁺⁻')
const NORMAL_TO_SUPERSCRIPT_RE = /[0-9+-]/g
export function superscript(s: string): string {
return s.replace(NORMAL_TO_SUPERSCRIPT_RE, c => NORMAL_TO_SUPERSCRI... |
let sensorType: string
// ANALOG or TILT
sensorType = "TILT"
while (true) {
// splash screen (flood monitor)
basic.showLeds(`
# # # . .
# . . . .
# # . # .
# . . # .
# . . # #
`)
while (true) {
if (input.buttonIsPressed(Button.A)) {
// tes... |
import { LocalStorage } from './LocalStorage';
import { Settings } from './Settings';
import { Shared } from './Shared';
interface RequestQueueList {
threshold: number;
thresholds: Record<string, number> | null;
minThresholds: Record<string, number>;
minute_limit: number;
hour_limit: number;
day_limit: number;
... |
/*
// This file is subject to the terms and conditions defined in
// file 'LICENSE.md', which is part of this source code package.
*/
import { debug } from './utility';
import Message, {
EntryData,
StaffData,
ColumnFormat,
EntryFormat,
StaffFormat,
} from './message';
import {
examples,
} from './example... |
<reponame>k1nz/conciliation-management<gh_stars>0
import { GENDER_TYPE, QuarterType, SemiannualType } from '@/constants';
import { WithCondition } from './request';
import { GetPartsRequired } from '@/types/utils';
export type MonthType = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
export enum PARTY_TYPE {
Fi... |
enum CardLayout {
NORMAL = "normal",
MODAL_DFC = "modal_dfc",
MELD = "meld",
TRANSFORM = "transform",
SPLIT = "split",
}
export enum CardImageSizes {
SMALL = "small",
NORMAL = "normal",
LARGE = "large",
PNG = "png",
ART_CROP = "art_crop",
BORDER_CROP = "border_crop",
}
type CardImages = {
small... |
<reponame>artemshein/chipmunk
import { Component, Input, OnDestroy, ChangeDetectorRef, AfterViewInit, ViewChild, NgZone } from '@angular/core';
import * as Toolkit from 'chipmunk.client.toolkit';
import * as ThemeColors from '../../../../theme/colors';
import { MatTableDataSource, MatSort, Sort } from '@angular/materia... |
<filename>custom-libraries/utils/elemHelper/models/window-interactors.ts
/* tslint:disable */
import * as fs from 'fs';
import * as path from 'path';
import { browser, ElementFinder } from 'protractor';
require('env-params').env(browser.params.environment, 'environment/');
import { timeout } from '../utils/validator';... |
<reponame>Bhaskers-Blu-Org2/staticstaging
/**
* The base type for all types.
*/
export abstract class Type {
_brand_Type: void;
}
/**
* Primitive types. Each primitive type is a (shared) instance of this class.
*/
export class PrimitiveType extends Type {
constructor(public name: string) { super() };
// A w... |
<gh_stars>100-1000
import { FSUtils } from "./FSUtils";
import * as fs from "fs";
import * as path from "path";
import * as _ from "lodash";
import * as fg from "fast-glob";
/**
* The XElements are the common objects we encounter in an X-Framework applications:
* Collections, Models, GraphQL Entities, Services, Exce... |
import React, { FC, useState } from 'react'
import { Controller, useFormContext } from 'react-hook-form'
import differenceInMonths from 'date-fns/differenceInMonths'
import addMonths from 'date-fns/addMonths'
import formatISO from 'date-fns/formatISO'
import parseISO from 'date-fns/parseISO'
import format from 'date-fn... |
<gh_stars>0
// FYI: any request that needs the HttpOnly cookie to be sent (e.g. b/c the server
// needs the seed phrase) needs the {withCredentials: true} option. It may also needed to
// get the browser to save the cookie in the response.
// https://github.com/github/fetch#sending-cookies
import { Injectable } from "@... |
export interface SearchResultsApiResponse {
readonly results: WorkerSearchResult[];
readonly page_number: number;
readonly num_results: number;
readonly total_num_results: number;
}
export interface QueueApiResponse {
readonly tasks: WorkerQueueItem[];
}
export interface DashboardApiResponse {
... |
<reponame>DTS-STN/eligibility-estimator-client
import { WebTranslations } from '.'
import { Language, Locale } from '../../utils/api/definitions/enums'
const en: WebTranslations = {
_language: Language.EN,
_locale: Locale.EN,
oas: 'Old Age Security (OAS)',
gis: 'Guaranteed Income Supplement (GIS)',
alw: 'Al... |
import React, { Component, Fragment } from 'react';
import { RouteComponentProps } from '@reach/router';
import { main } from '../temp/demo';
declare global {
interface Window { MediaRecorder: any; }
}
interface IProps extends RouteComponentProps {
propVar: any;
}
interface IState {
stateVar: any;... |
<reponame>jiatuhao/engine-3-zjt
/*
Copyright (c) 2020 <NAME>., Ltd.
https://www.cocos.com/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated engine source code (the "Software"), a limited,
worldwide, royalty-free, non-assignable, revocable and non-exclus... |
import * as React from 'react';
import { Form, Input, Select, DatePicker, Checkbox, Radio } from 'antd';
import classnames from 'classnames';
import * as moment from 'moment';
// import DataDictionaryComponents from '../../DataDictionaryComponents';
const { RangePicker } = DatePicker;
const { TextArea } = Input;
cons... |
import { Request, Response, NextFunction } from "express";
import mongoose from "mongoose";
import GiftModel from "./gift.model";
import { uploadImage } from "../../helpers/function-helpers/multer-config";
import {
IParent,
IChild,
IGift,
IParentPopulated,
IChildPopulated,
} from "../../helpers/typescript-hel... |
//#region General
export function addDefinationProperty(json, definationName: string) {
json.__defination = definationName;
return json;
}
export function getDateinMMDDYYYY(date: Date) {
let mm: string;
let dd: string;
let yyyy: string;
let dateString: string;
dd = date.getDate().toStrin... |
<filename>projects/angular-extensions/controls/ngx-controls.module.ts
import { format } from "date-fns";
import { ModuleWithProviders, NgModule, Type } from "@angular/core";
import { CommonModule } from "@angular/common";
import {
NgxMatDateAdapter,
NgxMatDatetimePickerModule,
NgxMatNativeDateAdapter,
NgxMatTi... |
// Angular 2 httpx adapter
// based on https://docs.angularjs.org/api/ng/service/http
import { Http, Headers, Request, RequestOptions, Response } from 'angular2/http';
/**
* Ajax http response abstraction expected by Breeze DataServiceAdapter
*/
interface HttpResponse {
config: {};
data: any;
getHeaders: (hea... |
<reponame>rondemena/BotFramework-Emulator
import { SettingsImpl, SharedConstants } from '@bfemulator/app-shared';
import { BotConfigWithPathImpl, CommandRegistryImpl } from '@bfemulator/sdk-shared';
import { bot } from '../botData/reducers/bot';
import * as store from '../botData/store';
import { mainWindow } from '../... |
<gh_stars>0
require("global-jsdom/register");
import {
compileTrio,
prepareState,
RenderStatic,
stepUntilConvergence,
} from "@penrose/core";
const fs = require("fs");
const chalk = require("chalk");
const neodoc = require("neodoc");
const uniqid = require("uniqid");
const convertHrtime = require("convert-hrti... |
<reponame>btoo/noverlap<gh_stars>0
type ResolveType<T> = T extends Promise<infer R> ? R : T;
type HashFunction<T, P extends any[]> = (this: T, ...args: P) => any;
interface NoverlapConfig<T, P extends any[]> {
hash?: HashFunction<T, P>;
comparator?: (hash: any, existingKey: any) => boolean;
wait?: number;
/** ... |
<reponame>justin-hackin/polyhedz-studio
// eslint-disable-next-line max-classes-per-file
import {
chunk, last, range, startCase, sum, uniq,
} from 'lodash';
import {
detach, getRootPath, Model, model, prop, rootRef,
} from 'mobx-keystone';
import { computed } from 'mobx';
import {
distanceFromOrigin, lineLerp, P... |
// Copyright (C) 2019 Orange
//
// This software is distributed under the terms and conditions of the 'Apache License 2.0'
// license which can be found in the file 'License.txt' in this package distribution
// or at 'http://www.apache.org/licenses/LICENSE-2.0'.
import { Component, OnInit, OnDestroy } from '@angula... |
/* eslint-disable react/jsx-one-expression-per-line */
/* eslint-disable @typescript-eslint/ban-types */
import React, { useState, useCallback, useEffect } from 'react';
import DateFnsUtils from '@date-io/date-fns';
import { KeyboardDatePicker, KeyboardTimePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';
... |
import * as vscode from "vscode";
import * as glob from "glob";
import minimatch from "minimatch";
import { Passage, PassageOrigin, PassageRange, PassageStringRange } from "./passage";
import { parseRawText } from "./parse-text";
export async function readFile(path: string) {
return Buffer.from(await vscode.workspa... |
/*
* @Description:
* @Version: 1.0
* @Autor: Tabbit
* @Date: 2021-04-08 10:54:07
* @LastEditors: Tabbit
* @LastEditTime: 2021-05-02 22:57:12
*/
import {
Avatar,
Button,
Card,
CardActionArea,
CardActions,
CardContent,
CardHeader,
Collapse,
createStyles,
Divider,
Grid,
IconButton,
makeSt... |
<gh_stars>0
import { HttpFile } from '../http/http';
import { Configuration } from '../configuration';
import { Observable } from '../rxjsStub';
import { Constraint } from '../models/Constraint';
import { CreateConstraintRequest } from '../models/CreateConstraintRequest';
import { CreateFlagRequest } from '../models/Cr... |
import styled, { css } from 'styled-components';
import { rgba } from 'polished';
import container from 'styles/mixins/container';
import shimmer from 'styles/mixins/shimmer';
type ShapeProps = {
redCircle?: boolean;
blueCircle?: boolean;
outlinedCircle?: boolean;
oval?: boolean;
ovalBig?: boolean;
};
expo... |
import { INavLink, INavLinkGroup } from '@fluentui/react';
import {
IResource,
IResourceLabel,
IResourceLink,
ResourceLinkType
} from '../../../../types/resources';
interface ITreeFilter {
paths: string[];
level: number;
resourceItems: IResource[];
version: string;
}
export function createResourcesLis... |
import styled from "@emotion/styled";
import * as React from "react";
import { useCallback, useState } from "react";
import type { AnswerDTO } from "../../api/types/dto";
import { useLoginContext } from "../../contexts/login-context";
import { useSettingsContext } from "../../contexts/settings-context";
import { useApi... |
import { isNumber, isString } from '@dsv-charts/utils/type-check';
import {
max,
Selection,
scaleBand,
scaleLinear,
ScaleBand,
ScaleLinear,
min,
} from 'd3';
import { merge } from 'lodash';
import { Cartesian2Layout } from '@dsv-charts/components';
import { Cartesian2InnerRect } from '@dsv-charts/types'... |
<reponame>udamir/magx-client
import { Client, IJsonPatch, IConnection, IMessage, IRoomUpdate, ClientEvent } from "."
import { ISerializer } from "./serializer"
interface IChangeHandler {
op: string
filter: any[]
handler: (patch: IJsonPatch, params: any) => void
}
export interface IRoomData {
id: string
port... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.