text stringlengths 3.08k 15.5k |
|---|
import { vec3, quat, mat4 } from 'gl-matrix'
import * as MultiArrayView from 'multi-array-view'
import * as structs from '../const/structs'
import { ANIM_VALUE, MOTION_X, MOTION_Z } from '../const/constants'
import { ModelData } from './modelDataPa... |
<filename>packages/draggable/component.ts
import './utils/mouse-event.js';
import smoothscroll from 'smoothscroll-polyfill';
import {DraggableFoundation} from './foundation';
import {DragInfo} from './drag-info';
import {Avatar} from './avatar';
import {DraggableAdapter} from './adapter';
import {Axis, CustomScroll, Dr... |
<filename>modules/hub/src/vendor/connext/lib/utils.ts
/**
* A simple lock that can be used with async/await.
*
* For example:
*
* funcLock = Lock.released()
*
* // NOTE: this pattern is implemented by the `synchronized` decorator, below.
* async function lockedFunction() {
* await this.funcLock
* thi... |
import React from 'react'
import memoizeOne from 'memoize-one'
import { Icon, Menu } from 'antd'
import * as classnames from 'classnames'
import DashboardItemControlForm from '../DashboardItemControlForm'
import { IQueryConditions } from 'containers/Dashboard/Grid'
import { IModel } from 'containers/Widget/components/W... |
<filename>src/R4/Resource/RTTI_EpisodeOfCare.ts
import * as t from 'io-ts';
import { RTTI_id } from '../Scalar/RTTI_id';
import { RTTI_Meta, IMeta } from './RTTI_Meta';
import { RTTI_uri } from '../Scalar/RTTI_uri';
import { RTTI_Element, IElement } from './RTTI_Element';
import { RTTI_code } from '../Scalar/RTTI_code'... |
import { Body } from "./body";
import { IncomingRequestMessage } from "./incoming-request-message";
import { getReasonPhrase, newTag, str_utf8_length } from "./utils";
/**
* A SIP message sent from a local server to a remote client,
* for indicating the status of a request sent from the
* client to the server.
* h... |
import * as path from "path";
import * as asc from "assemblyscript/cli/asc";
import { DiagnosticCategory } from "assemblyscript";
import { getOptions, interpolateName, OptionObject } from "loader-utils";
import { validate } from "schema-utils";
import { Schema } from "schema-utils/declarations/validate";
import { creat... |
<filename>app/services/themes/theme.model.ts<gh_stars>0
import { CssColor, ThemeElement } from "app/services/themes/theme-core";
import * as tinycolor from "tinycolor2";
import { EntityColorDefinition, ThemeDefinition } from "./theme-definition.model";
export class ColorPalette extends ThemeElement<string> {
@CssC... |
<gh_stars>1-10
/**
* A parser that can read a single argument
* value.
*
* Implement this interface to provide parsers
* for custom argument types.
*/
export interface ArgumentType<T> {
/**
* Function which parses a single argument. If
* the parsing fails, this should throw an error.
*/
readonly pars... |
<gh_stars>0
import { ApiResponse } from 'types'
import { APP_CONFIG } from 'utils/config'
import { saveAccessToken as saveAccessTokenToAirtable, tryGetAccessToken as tryGetAccessTokenFromAirtable } from './airtableCache'
import { saveAccessToken as saveAccessTokenToFs, tryGetAccessToken as tryGetAccessTokenFromFs } fro... |
import adm_zip, { IZipEntry } from "adm-zip";
import App from "./interfaces/app";
import Apps from "./apps";
import Axios, { AxiosResponse } from "axios";
import crypto from "crypto";
import fs from "fs";
import WorkFolder from "./workfolder";
// Telling axios to use the internal HTTP module.
Axios.defaults.adapter = ... |
<filename>utils/src/abi_encoder/evm_data_type_factory.ts
/* tslint:disable max-classes-per-file */
import { DataItem, MethodAbi } from 'ethereum-types';
import * as _ from 'lodash';
import { generateDataItemFromSignature } from './utils/signature_parser';
import { DataType } from './abstract_data_types/data_type';
im... |
import got from 'got';
import fs from 'fs';
import { GithubTag, TagCompare } from '../@types/github';
import path from 'path';
import { UpdateFile } from '../@types/updateFile';
import packageJson from '../package.json';
import { CompilerOptions, transpileModule } from 'typescript';
import tsConfig from '../tsconfig.js... |
<reponame>cellog/ion-router
import { createBrowserHistory } from 'history'
import { createPath } from 'history'
import invariant from 'invariant'
import * as types from './types'
import * as actions from './actions'
import * as helpers from './helpers'
import { Store, Action } from 'redux'
import { IonRouterOptions, a... |
<gh_stars>0
import { bold, yellow, red } from "chalk"
import { satisfies } from "semver"
import { IBaseGeneratorConstructor } from "../../../types"
import { join } from "path"
const EntityGenerator = require("../entity/index")
const Environment = require("yeoman-environment")
const BaseGenerator: IBaseGeneratorConstru... |
/**
* VirtualListView.tsx
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT license.
*
* A cross-platform virtualized list view supporting variable-height items and
* methods to navigate to specific items by index.
*
* Misc notes to help understand the flow:
* 1. There are on... |
const COLOR_THEMES = {
LIGHT: {
// Basic
brandGreen: '#00B956',
brandPurple: '#731982',
base: '#FFFFFF',
content: '#333333',
spbSky0: '#F6F6F6',
spbSky1: '#EDEDED',
spbSky2: '#D8D8D8',
spbSky3: '#999999',
// Secondary
warmRedC:... |
import glob from "fast-glob";
import * as path from "path";
import * as DEFAULTS from "./defaults";
export interface EntryFileInfo {
moduleName: string;
fileRelativePath: string;
index: number;
baseDir: string;
}
export interface EntryFileFormatterOptions {
/** whether to exclude baseDIr in returned filepat... |
export type { default as Aksjonspunkt } from './src/aksjonspunktTsType';
export type { default as ArbeidsforholdV2 } from './src/arbeidsforholdV2TsType';
export type { default as Behandling } from './src/behandlingTsType';
export type { default as Beregningsgrunnlag } from './src/beregningsgrunnlagTsType';
export type ... |
import _ from 'lodash';
import React from 'react';
import PropTypes from 'prop-types';
import { lucidClassNames } from '../../util/style-helpers';
import {
findTypes,
omitProps,
StandardProps,
} from '../../util/component-types';
const cx = lucidClassNames.bind('&-Grid');
const { string, bool, node } = PropTypes;
... |
/*
* 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 no... |
/*
* decaffeinate suggestions:
* DS101: Remove unnecessary use of Array.from
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
import child_process fr... |
import { AssociativeArray } from 'cesium';
import { Cartesian3 } from 'cesium';
import { Color } from 'cesium';
import { defined } from 'cesium';
import { destroyObject } from 'cesium';
import { DeveloperError } from 'cesium';
import { Matrix3 } from 'cesium';
import { Matrix4 } from 'cesium';
import { Quaternion } fro... |
import template from '../server/template';
import createStore from '../store/createStore';
import {setCurrentHour, setDate, setRooms, setTimeCount} from '../store/actions/rooms';
import {setLoggedIn, setUserInfo} from '../store/actions/user';
import renderAppToString from '../server/renderAppToString';
import { co... |
// Copyright 2018 The Outline Authors
//
// 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 agre... |
import React, { useState, useEffect, useContext, useRef, useLayoutEffect } from 'react';
import { ExtensionContextData, ExtensionContext } from '@looker/extension-sdk-react';
import {
Code, Table, TableBody, TableHead, TableRow, TableHeaderCell, TableDataCell, Heading, Paragraph, TextArea, Spinner, Box, SpaceVertical... |
<gh_stars>0
import {ChangeDetectorRef, Component, HostListener, OnInit} from '@angular/core';
import {BatchUploadModalComponent} from '../../../tools/batch-upload-modal/batch-upload-modal.component';
import {PharosProfileService} from '../../../auth/pharos-profile.service';
import {MatDialog} from '@angular/material/di... |
import {
ExtensionContext,
debug,
DebugConfigurationProvider,
WorkspaceFolder,
DebugAdapterInlineImplementation,
DebugAdapterDescriptorFactory,
DebugConfiguration,
DebugAdapterDescriptor,
DebugSession,
CancellationToken,
ProviderResult,
window,
commands,
} from "vscode";
import { GodotDebugSession } from "... |
<gh_stars>1-10
import * as vscode from 'vscode';
import ProbeRaw from './doc/probe';
import syscallRaw from './doc/syscall';
import vfsRaw from './doc/vfs';
interface VariableInformation {
name: string,
position: vscode.Position | null,
type?: string,
document?: string | vscode.MarkdownString
}
inter... |
<filename>ui/src/app/lib/devices.component.ts
import {OnDestroy, OnInit} from '@angular/core';
import {BaseComponent} from '../lib/base.component';
import {IScaleSettings, ISingleScaleSettings} from '../components/scale-set.component';
import {DeviceService, IDevice, IDevicePropertyOut, IDevicePropertyLambda} from '.... |
<gh_stars>1-10
import { call, select, takeEvery, put } from 'redux-saga/effects'
import * as socialActions from 'store/social/users/actions'
import * as cacheActions from 'store/cache/actions'
import { Kind } from 'store/types'
import * as confirmerActions from 'store/confirmer/actions'
import { getUsers, getUser } fr... |
<filename>packages/neotracker-server-scrape/src/utils/getAssetsAndContractsForClient.ts
import { ConfirmedTransaction, Contract, nep17, scriptHashToAddress } from '@neo-one/client-full';
import { createChild, serverLogger } from '@neotracker/logger';
import {
Asset as AssetModel,
Contract as ContractModel,
NEP17_... |
import React, { FC, useState, useEffect, useRef } from 'react';
import { navigate } from 'gatsby';
import Img from 'gatsby-image';
import { up } from 'styled-breakpoints';
import { useBreakpoint } from 'styled-breakpoints/react-styled';
import Container from '../organisms/Container';
import Grid, { GridCell } from '../... |
import { MuSchema } from './schema/schema';
import { MuWriteStream, MuReadStream } from './stream';
import { MuSocket, MuData } from './socket';
import { MuTrace } from './trace';
import stableStringify = require('json-stable-stringify');
import sha512 = require('hash.js/lib/hash/sha/512');
const RAW_MESSAGE = 0xfff... |
import { sleep } from "@extrahash/sleep";
import { Client as VexClient, IFile, IUser } from "@vex-chat/libvex";
import { XTypes } from "@vex-chat/types";
import ax from "axios";
import { Client as DiscordClient, Message } from "discord.js";
import log from "electron-log";
import FileType from "file-type";
import fs fro... |
<filename>clients/client-kinesis/src/commands/CreateStreamCommand.ts
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandler... |
import Link from 'next/link'
import { FC, useState } from 'react'
import { useRouter } from 'next/router'
import useRazorpay, { RazorpayOptions } from "react-razorpay";
import CartItem from '@components/cart/CartItem'
import { Button, Text } from '@components/ui'
import { useUI } from '@components/ui/context'
import Si... |
<gh_stars>1-10
import { Database, Logger, Tables, Time } from 'koishi-core'
import { StatRecord, Synchronizer, RECENT_LENGTH } from '../payload/stats'
import type MysqlDatabase from 'koishi-plugin-mysql'
const logger = new Logger('status')
function joinKeys(keys: readonly string[]) {
return keys.map(key => `\`${key... |
import '@ui5/webcomponents-icons/dist/message-error';
import '@ui5/webcomponents-icons/dist/message-information';
import '@ui5/webcomponents-icons/dist/message-success';
import '@ui5/webcomponents-icons/dist/message-warning';
import '@ui5/webcomponents-icons/dist/question-mark';
import '@ui5/webcomponents-icons/dist/hi... |
import {
Button,
FormLabel,
FormControl,
Heading,
Stack,
Stat,
StatGroup,
StatLabel,
StatNumber,
StatHelpText,
Switch,
Text,
Select,
useToast
} from '@chakra-ui/react'
import format from 'date-fns/format'
import dynamic from 'next/dynamic'
import {useCallback, useState} from 'react'
import u... |
import React, { useEffect, useState, useRef } from 'react';
import { NextPageContext } from 'next-server/dist/lib/utils';
import { Layout } from '../../src/containers/Layout/Layout';
import Head from 'next/head';
import { getGolf, getLeaderboard, getUser } from '../../src/dynamoDb';
import { Golf, GolfLeaderboard, User... |
<reponame>ffox77/mazarine-sea<filename>package/maz-wallet/src/service/web3/constellation-web3-account.ts
import {IKeyringAccount, KeyringNetwork} from "@mazarine-sea/maz-keyring";
import {
BlockExplorerApi,
globalDagNetwork,
LoadBalancerApi,
NetworkInfo, PendingTx,
Transaction
} from "@stardust-col... |
import {Component, EventEmitter, Inject, Input, OnInit, Output} from '@angular/core';
import {HttpEventType, HttpResponse} from '@angular/common/http';
import {ImagineService} from '@shared/modules/imagine/imagine.service';
import {MatSnackBar} from '@angular/material/snack-bar';
import {EntityType} from '@shared/domai... |
import {
Box,
Flex,
HStack,
Link,
IconButton,
Button,
useDisclosure,
useColorModeValue,
Stack,
VStack,
Center,
Text,
Collapse,
Icon,
Divider
} from '@chakra-ui/react'
import {HamburgerIcon, CloseIcon, ChevronDownIcon} from '@chakra-ui/icons'
import {FiShoppingCart} from '@react-icons/all-f... |
import SqrlErr, { ParseErr } from './err'
import { trimWS } from './utils'
/* TYPES */
import { SqrlConfig } from './config'
export type TagType = '~' | '/' | '#' | '?' | 'r' | '!' | 's'
export type TemplateAttribute = 'c' | 'f' | 'fp' | 'p' | 'n' | 'res' | 'err'
export type TemplateObjectAttribute = 'c' | 'p' | 'n'... |
<reponame>Nyrio/LD42_RoboCoup<gh_stars>1-10
import * as ex from 'excalibur';
import { Resource } from '../../resource';
import { GameSettings } from '../../gamesettings';
import { GameScene } from '../../scenes/gameScene/gamescene';
// This class handles the player animation and movement.
// It listens to clicks on t... |
// These are the routines which implement the command line
import childProcess = require("child_process");
import fs = require("fs");
const jsonfile = require("jsonfile");
import path = require("path");
// Mine
import dvcsUrl = require("./dvcs-url");
import fsX = require("./fsExtra");
import repo = require("./repo");
... |
import React, { useMemo, useCallback, useState, useContext } from 'react';
import {
View,
Text,
StyleSheet,
StatusBar,
TouchableOpacity,
FlatList,
Alert,
ActivityIndicator,
} from 'react-native';
import { BlurView } from '@react-native-community/blur';
// Redux
import { useDispatch, useSelector } from ... |
import SwissClient from "../../SwissClient";
import {
swiss_blue
} from "../../config";
import {
Message,
GuildMember,
MessageEmbed,
ReactionCollector,
MessageReaction,
User
} from "discord.js";
import {
awaitMessage,
getRandom,
gameJoin
} from "../../utils";
export let name = "tictactoe";
export l... |
<reponame>emadurandal/grimoirejs-math
///<reference path="./gl-matrix.d.ts"/>
import VectorBase from "./VectorBase";
import {GLM, vec4} from "gl-matrix";
class Vector4 extends VectorBase {
public static get XUnit(): Vector4 {
return new Vector4(1, 0, 0, 0);
}
public static get YUnit(): Vector4 {
retur... |
<reponame>KJacob/OneNoteApi<filename>src/scripts/oneNoteApiBase.ts
import {ErrorUtils, RequestErrorType, RequestError} from "./errorUtils";
import * as ContentType from "content-type";
import {Promise} from "es6-promise";
export type XHRData = ArrayBufferView | Blob | Document | string | FormData;
export interface R... |
import { Language } from "../../Language"
import { Alpha2 } from "../Alpha2"
import { Alpha3 } from "../Alpha3"
import { Numeric } from "../Numeric"
import * as ar from "./ar"
import * as az from "./az"
import * as be from "./be"
import * as bg from "./bg"
import * as bs from "./bs"
import * as ca from "./ca"
import * ... |
<reponame>BrunnerLivio/lxdhub<gh_stars>0
import { Test } from '@nestjs/testing';
import { plainToClass } from 'class-transformer';
import { PaginationOptionsDto } from '../common';
import { ImageAvailabilityService } from '../image-availability/image-availability.service';
import { LXDService } from '../lxd/lxd.servic... |
<filename>src/test/a11y/a11y.ts
import fs from 'fs';
import Axios from 'axios';
import puppeteer from 'puppeteer';
import {randomData} from '../functional/shared/random-data';
import * as urls from '../../main/utils/urls';
import {config as testConfig} from '../config';
import {
assignRolesToParentRole,
createAssig... |
import type { ClutchColors, ComponentState, ThemeVariant } from "./types";
export const LIGHT_COLORS: ClutchColors = {
neutral: {
50: "#F8F8F9",
100: "#F0F1F3",
200: "#DBDBE0",
300: "#C2C3CB",
400: "#9E9FAC",
500: "#868798",
600: "#56586E",
700: "#3D4059",
800: "#252845",
900:... |
import path from 'path'
import fs from 'fs'
import os from 'os'
import ini from 'ini'
import chalk from 'chalk'
import BbPromise from 'bluebird'
import _ from 'lodash'
import QcloudAPI from 'qcloudapi-sdk'
import QcloudCOS from 'cos-nodejs-sdk-v5'
import { QcloudAPIGateway } from 'qcloud-apigateway'
import { QcloudComm... |
import {
ILayoutRestorer,
JupyterFrontEnd,
JupyterFrontEndPlugin
} from '@jupyterlab/application';
import {
ICommandPalette,
MainAreaWidget,
WidgetTracker
} from '@jupyterlab/apputils';
import { IMainMenu } from '@jupyterlab/mainmenu';
import { ISettingRegistry } from '@jupyterlab/settingregistry';
import {... |
import React, { FunctionComponent, useState } from 'react';
import {
Chart as PFChart,
ChartAxis,
ChartLegendTooltip,
ChartVoronoiContainer,
createContainer
} from '@patternfly/react-charts';
import {
ChartApiData,
ChartData,
ChartKind,
ChartSchema,
ChartSchemaElement,
ChartS... |
import { PixelCrop, PercentCrop, Crop, Ords } from './types'
export const defaultCrop: PixelCrop = {
x: 0,
y: 0,
width: 0,
height: 0,
unit: 'px',
}
export function clamp(num: number, min: number, max: number) {
return Math.min(Math.max(num, min), max)
}
export function areCropsEqual(cropA: Partial<Crop>,... |
<gh_stars>0
const { botToken, emailAdress } = require('./config/config');
import { executeQuery } from './helpers/database-adapter';
import { queries } from './helpers/queries';
import { logger } from './helpers/logger';
import { QueryResult, Query } from 'pg';
import { Project , ProjectsInformation} from './@types/qu... |
<gh_stars>0
/*
* Copyright 2020 The Yorkie Authors. 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless... |
/* eslint jsx-a11y/no-static-element-interactions: 0 */
/* eslint jsx-a11y/click-events-have-key-events: 0 */
/* eslint jsx-a11y/anchor-is-valid: 0 */
// TODO: Fix up a11y eslint here
// TODO: All the `<li>` below that have role button should just be `<button>` with proper styling
import * as React from "react";
impo... |
import Snackbar from "@material-ui/core/Snackbar";
import MuiAlert from "@material-ui/lab/Alert";
import React, { useState } from "react";
import Avatar from "@material-ui/core/Avatar";
import AccountCircle from "@material-ui/icons/AccountCircle";
import Button from "@material-ui/core/Button";
import router from "next/... |
<reponame>robaxelsen/stencil
import * as d from '../../declarations';
import { drainPrerenderQueue, initializePrerenderEntryUrls } from './prerender-queue';
import { generateRobotsTxt } from './robots-txt';
import { generateSitemapXml } from './sitemap-xml';
import { generateTemplateHtml } from './prerender-template-ht... |
<reponame>nataliemisasi/grist-core<filename>app/client/aclui/PermissionsWidget.ts
/**
* Implements a widget showing 3-state boxes for permissions
* (for Allow / Deny / Pass-Through).
*/
import {colors, testId} from 'app/client/ui2018/cssVars';
import {cssIconButton, icon} from 'app/client/ui2018/icons';
import {menu... |
import axios from 'axios';
import qs from 'querystring';
import 'colors';
type LoggerFunction = (() => any) | ((...data: any[]) => any);
export type Logger = {
debug: LoggerFunction;
info: LoggerFunction;
warn: LoggerFunction;
error: LoggerFunction;
}
type RawBaseClientOptions = {
/** The logger t... |
<filename>frontend/src/app/app.module.ts<gh_stars>0
// Copyright 2019 Google 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
//
... |
/*{# Copyright (c) 2014 Turbulenz Limited #}*/
/// General properties for subtitle playback
interface SubtitlePlayerParameters
{
mathDevice: MathDevice;
graphicsDevice: GraphicsDevice;
fontManager: FontManager;
shaderManager: ShaderManager;
fontURL: string;
shaderURL: string;
fontTechnique... |
<filename>src/AsyncTracker.tsx
import * as React from "react";
import { connect } from "react-redux";
import { Store } from "redux";
import { actionCreators as asyncActions } from "./redux/actions/async";
import { RootState } from "./redux/reducers";
import { AsyncStatus } from "./redux/reducers/async";
import {
sele... |
// MIT © 2017 azu
import { Payload } from "../payload/Payload";
import { DispatcherPayloadMeta, DispatcherPayloadMetaImpl, Transaction } from "../DispatcherPayloadMeta";
import { Commitment, UnitOfWork } from "./UnitOfWork";
import { MapLike } from "map-like";
import { UseCaseExecutor } from "../UseCaseExecutor";
impor... |
import {Application} from 'hadouken-js-adapter';
import {_Window} from 'hadouken-js-adapter/out/types/src/api/window/window';
import {createChildWindow} from '../../provider/utils/createChildWindow';
import {delay} from '../../provider/utils/delay';
import {dragSideToSide} from '../../provider/utils/dragWindowTo';
imp... |
/*
* Copyright (c) 2018-2021, NWO-I CWI and Swat.engineering
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
*... |
import * as React from 'react';
import {
Alert,
Button,
Checkbox,
Dropdown,
Form,
Icon,
Input,
Layout,
} from 'antd';
import { AccountActions } from '../stores/account/actions';
import { Dispatch } from 'redux';
import { connect } from 'react-redux';
import { FormComponentProps } from 'a... |
import { resolve } from "path";
import ora from "ora";
import chalk from "chalk";
import { prompt, Question, ListQuestion } from "inquirer";
import createCommand from "../commands/create";
import { subscribe } from "../steps";
import { errorLogger, log } from "../utils";
import { CreateCommandOptions } from "../steps/t... |
import {
isArray,
isInvalid,
isNull,
isNullOrUndef,
isStatefulComponent,
isUndefined
} from 'inferno-shared';
import VNodeFlags from 'inferno-vnode-flags';
import {
normalize
} from './normalization';
import options from './options';
export type InfernoInput = VNode | null | string | number;
export type Ref = F... |
import { BSDataTableColDefinition } from "../../src/commonTypes/common-types";
import { BSDataTableRow, BSDataTableSelect } from "../../src/components";
import { TestHelpers } from "./TestHelpers";
function GetColModel(): {
address: BSDataTableColDefinition, name: BSDataTableColDefinition,
age: BSDataTab... |
<reponame>Chofito/GestorLigas
import { Component, OnInit } from '@angular/core';
import { TorneoService } from '../../services/torneo.service';
import { Liga } from '../../models/liga.model';
import { Equipo } from '../../models/equipo.model';
import { ChartDataSets, ChartType, RadialChartOptions } from 'chart.js';
imp... |
<filename>packages/extensions/json/src/utils.ts
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license.
//
// Microsoft Bot Framework: http://botframework.com
//
// Bot Framework Emulator Github:
// https://github.com/Microsoft/BotFramwork-Emulator
//
// Copyright (c) Microsoft Corporatio... |
import assert from 'deep-equal'
import { Struct } from 'superstruct'
export const getPath = (keyPath: string, dataToCheck: any, delim = '.'): any | undefined => {
let temp = dataToCheck
if (keyPath.includes(delim)) {
keyPath.split(delim).forEach(key => {
if (Object.keys(temp).length > 0 && key in temp) {... |
<gh_stars>0
import { ComponentType } from 'react';
import { Animated, StyleSheet } from 'react-native';
import { moderateScale } from 'react-native-size-matters';
import styled from 'styled-components/native';
import { InputStatus } from '../../enums';
import { TextInputType, ThemeProps } from '../../types';
import {
... |
import {CoCoModule} from "../interfaces";
import * as DiscordJS from "discord.js";
import {
Collection,
Guild,
Message,
MessageReaction,
PartialMessageReaction,
PartialUser,
Role,
TextChannel,
User
} from "discord.js";
const regex = /^.*<@(?:&(\d+)|([^\n:<>@&]+))>.*?((?:<a?)?:[^\n: ]+:(?:\d+>)?|(?:\... |
import "reflect-metadata";
import express from "express";
import bodyParser from "body-parser";
import { Container } from "typedi";
import { exit } from "process";
import { MetadataKeys } from "./metadataKeys";
import { ControllerMetadata } from "./decorators/Controller";
import { HTTPMethodMetadata, HTTPMethod } fro... |
import { flags as Flags } from '@cli-engine/command'
import { Config, ICommand } from '@cli-engine/config'
import { color } from '@heroku-cli/color'
import { args as Args } from 'cli-flags'
import { cli } from 'cli-ux'
import _ from 'ts-lodash'
import { inspect } from 'util'
import deps from '../deps'
import { IPlugi... |
// 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... |
import { parseNomen } from "parse-nomen"
import { Image, isUUID, Node, normalizeText, stringifyNormalized, UUID } from "phylopic-models"
import nameMatches from "../client/commands/utils/nameMatches"
import nameToText from "../client/commands/utils/nameToText"
import precedes from "../client/commands/utils/precedes"
im... |
<reponame>nicofrand/tui.chart
import Component from './component';
import {
ChartState,
Options,
OptionsWithDataLabels,
Series,
NestedPieSeriesDataType,
} from '@t/store/store';
import {
DataLabelModels,
DataLabel,
DataLabelsMap,
SeriesDataLabels,
PointDataLabel,
RadialDataLabel,
DataLabelSeries... |
import React, { useState, useEffect } from 'react';
import { makeStyles } from '@material-ui/core/styles';
import capitalize from 'capitalize';
import classNames from 'classnames';
import Grid from '@material-ui/core/Grid';
import { useSnackbar } from 'notistack';
import { isBefore, parse } from 'date-fns';
import St... |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* luUtil.ts is a single place use lu-parser handle lu file operation.
* it's designed have no state, input text file, output text file.
* for more usage detail, please check client/__tests__/utils/luUtil.test.ts
*/
import { QnAFile, Dia... |
import * as vscode from "vscode";
import { EXTENSION_NAME, SWING_FILE } from "../constants";
import { DEFAULT_MANIFEST, openSwing } from "../preview";
import { store } from "../store";
import { stringToByteArray, withProgress } from "../utils";
import {
enableGalleries,
loadGalleries,
registerTemplateProvider,
} ... |
<filename>src/index.ts
import got from 'got';
import { JWK, JWKS, JWS, JWT } from 'jose';
import * as fs from 'fs';
import { v4 as uuidv4 } from 'uuid';
import { getCertificates, CertificateResponse, findOrganizationIdFromCertificate, x5cToCert } from './certificate-utils';
import * as https from 'https';
inter... |
import {Brackets, EntityManager, EntityRepository} from 'typeorm';
import {Context, ContextUser} from '../../context';
import {Project as ProjectModel, UserProjectRoleOptions, UserProjectRoleOptions as UPRO} from './model';
import {ProjectSource} from '../../bindingTypes';
import * as _ from 'lodash';
import * as DataL... |
<gh_stars>0
import { Browser, getComputedStyles, setColor } from 'roosterjs-editor-dom';
import {
DefaultFormat,
DocumentCommand,
EditorOptions,
IEditor,
LifecyclePluginState,
PluginEventType,
PluginWithState,
PluginEvent,
ChangeSource,
} from 'roosterjs-editor-types';
const CONTENT... |
import React from 'react';
import {
Alert,
Image,
InteractionManager,
LayoutAnimation,
Linking,
SafeAreaView,
StyleSheet,
TouchableOpacity,
View,
Dimensions
} from 'react-native';
import PropTypes from 'prop-types';
import Toast from 'react-native-root-toast';
import NaviBar, {fo... |
<reponame>glaucoma/glaucoma-risk-calculator-rest-api
import { asyncify, series, waterfall } from 'async';
import { default as restify_errors } from 'restify-errors';
import { JsonSchema } from 'tv4';
import { Request } from 'restify';
import { fmtError, GenericError, NotFoundError } from '@offscale/custom-restify-erro... |
<filename>packages/base/base.ts
import { EnhancedStore } from '@reduxjs/toolkit';
import { format } from 'date-fns';
const origin = '';
const reconnectTimeout = 5000;
// @ts-ignore
const messages = await import('./client/i18n/messages');
type DebounceCallbackFunction = () => void;
let timeout: number;
const deboun... |
<filename>ui/src/palette.ts
/**
Copyright (c) 2018-present, Eaton
All rights reserved.
This code is licensed under the BSD-3 license found in the LICENSE file in the root directory of this source tree and at https://opensource.org/licenses/BSD-3-Clause.
**/
import { BLUIColor } from '@brightlayer-ui/types';
/* Pri... |
import React, { useCallback, useState } from 'react';
import { Components, registerComponent, getFragment } from '../../lib/vulcan-lib';
import { useMulti } from '../../lib/crud/withMulti';
import { useMutation, gql } from '@apollo/client';
import { useCurrentUser } from '../common/withUser';
import { useTracking, useO... |
<reponame>uzkk/favorite
// @ts-ignore
import { ranks, charMap, tags, charList } from '../data'
import SortNode from './SortNode'
function getRank (name: string, ranks: string[]) {
const index = ranks.indexOf(name)
return index === -1 ? ranks.length : index
}
export function getCharactersInRange (range: string, ch... |
import express from 'express';
import expressMongoDb from 'mongo-express-req';
import { ValidationError } from 'express-validation';
import path from 'path';
import morgan from 'morgan'
const swaggerJSDoc = require('swagger-jsdoc');
const swaggerUi = require('swagger-ui-express');
// eslint-disable-next-line
// import... |
import * as Modifiers from "../../../../src/platform/web/modifiers";
// TODO:
// These old tests were ported from JavaScript to TypesSript verbatim.
// The next time the Modifiers gets a work over, these should be reviewed.
const offer: RTCSdpType = "offer";
const SessionDescription = {
withTcpCandidatesAndTelepho... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.