text
stringlengths
3.08k
15.5k
import assert from 'assert'; import { execSync } from 'child_process'; import { web3, BN } from "@project-serum/anchor" import { NodeWallet } from "@metaplex/js"; import { TOKEN_PROGRAM_ID, Token } from '@solana/spl-token'; import { getTokenAccountInfo } from '../../ts/src'; import { loadKeypair } from "../src/utils/...
function convertArrayToObject(array, value = undefined) { return array.reduce(function (obj, name) { obj[name] = value; return obj; }, {}) } // Doesn't work because the component has already been added to the component list by the time the walker gets to the children nodes export function isInsideComponentThatA...
// Copyright 2019 ProximaX Limited. All rights reserved. // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file import { PublicAccount } from '../account/PublicAccount'; import { NetworkType } from '../blockchain/NetworkType'; import { UInt64 } from '../UInt64'; impor...
<reponame>Mayank909/commerce-hub<gh_stars>1-10 import { ProductService } from "@/services/ProductService"; import { ActionTree } from 'vuex' import RootState from '@/store/RootState' import ProductState from './ProductState' import * as types from './mutation-types' import { hasError, showToast } from '@/utils' import ...
<reponame>GaGeVV/zan-proxy<filename>src/App/services/host.ts import { promisify } from 'es6-promisify'; import EventEmitter from 'events'; import fs from 'fs'; import jsonfile from 'jsonfile'; import { find, forEach } from 'lodash'; import fetch from 'node-fetch'; import path from 'path'; import { Service } from 'typed...
<reponame>vasipuica/ReactiveTraderCloud import Guard from '../guard'; import { Observable, BehaviorSubject, Subscription } from 'rxjs/Rx'; import DisposableBase from '../disposables/disposableBase'; import ConnectionStatus from './connectionStatus'; import { ConnectionTypeMapper } from '../../services/mappers'; import ...
<gh_stars>0 /* What is Node.js? Node.js is an open server environment JS on a server Node it free and run on various platforms What is NPM? Node Package Manager NPM is a platform and command line interface What is TypeScript? Typescript is a superset of Jav...
import * as ec2 from '@aws-cdk/aws-ec2'; import * as eks from '@aws-cdk/aws-eks'; import * as iam from '@aws-cdk/aws-iam'; import { IHostedZone } from '@aws-cdk/aws-route53'; import * as cdk from '@aws-cdk/core'; import { InternalNodegroup } from '../config/cluster'; import { NodeTaint } from '../types/cluster'; impor...
import { exit } from 'process'; import * as http from './http.js'; import * as pageFun from './contentFunctions.js'; /* * https://developer.mozilla.org/en-US/docs/Web/API/URL/URL * https://developer.mozilla.org/en-US/docs/Web/API/URL */ interface results { parentURL: string, status: string, statusMsg: string...
import {dirname, resolve} from 'path' import * as ts from 'typescript' import {collectDeepNodes, getFirstNode} from './ast-helpers' import {AddNodeOperation, ReplaceNodeOperation, StandardTransform, TransformOperation} from './interfaces' import {makeTransform} from './make-transform' export interface ResourcesMap { ...
import * as fs from 'fs'; import Inquirer from 'inquirer'; import Vorpal from 'vorpal'; import Node, { Contract } from 'evm-lite-core'; import Datadir from 'evm-lite-datadir'; import utils from 'evm-lite-utils'; import Session from '../core/Session'; import Logs from '../poa/Logs'; import { MonikerAnnounce, Nominee...
import { Expression, CompareExpression, LogicalExpression } from 'yasqlp'; import cloneDeep from 'lodash.clonedeep'; import { rotateCompareOp, isColumn } from '../op'; import { rewrite } from '../traverse'; import hashCode from '../../util/hashCode'; type AndGraphNode = { id: number, names: Expression[], connec...
<reponame>canac/maze-creator<gh_stars>0 import { range } from 'lodash'; export enum Side { Left, Top, Right, Bottom, } const allSides = [Side.Left, Side.Top, Side.Right, Side.Bottom]; export type Dimensions = { width: number; height: number; }; export class Wall { x: number; y: number; side: Side; ...
import React, {useEffect} from 'react'; import { Dimensions, StyleSheet } from 'react-native'; import { View } from '../../components/Themed'; import {ScrollView} from 'react-native' import {ActivityIndicator} from 'react-native' import {AppManager} from '../../logic/AppManager' import { useFocusEffect } from '@reac...
import { Badge, Box, Button, Flex, FormLabel, Switch, Wrap } from "@chakra-ui/core"; import { RouteComponentProps, useLocation } from "@reach/router"; import React, { useContext, useEffect, useState } from "react"; import { Helmet } from "react-helmet-async"; import { Trans, useTranslation } from "react-i18next"; impor...
<filename>packages/lib-core/src/store/PluginLoader.ts import type { AnyObject, ResourceFetch } from '@monorepo/common'; import { consoleLogger } from '@monorepo/common'; import * as _ from 'lodash-es'; import { PLUGIN_MANIFEST, REMOTE_ENTRY_SCRIPT, REMOTE_ENTRY_CALLBACK } from '../constants'; import type { PluginManife...
import { createAudioPlayer, VoiceConnection, VoiceConnectionStatus, } from "@discordjs/voice"; import { Client, Message } from "discord.js"; import { getConfigHintEmbed, getGeneralHintEmbed, getHelpEmbed, getLanguageHintEmbed, getTextHintEmbed, getVoiceHintEmbed, } from "../data/embed"; import { isM...
<reponame>bifravst/azure import * as program from 'commander' import * as chalk from 'chalk' import * as path from 'path' import * as fs from 'fs' import { createCARootCommand } from './commands/create-ca-root' import { IotDpsClient } from '@azure/arm-deviceprovisioningservices' import { AzureCliCredentials } from '@az...
import * as React from "react" import { Button, ButtonProps } from "@kaizen/button" import { Box, Icon } from "@kaizen/component-library" import { Heading, Paragraph } from "@kaizen/typography" import configureIcon from "@kaizen/component-library/icons/arrow-forward.icon.svg" import closeIcon from "@kaizen/component-li...
import { inRange, isEqual } from 'lodash'; import proj4 from 'proj4'; import { Inject, Injectable } from '@angular/core'; import { IMapFacadeConfig } from '../models/map-config.model'; import { mapFacadeConfig } from '../models/map-facade.config'; export interface IUtmZone { zone: number; utmProj: string; } export ...
/* eslint-disable import/max-dependencies */ import { Middleware } from '@via-profit-services/core'; import DataLoader from '@via-profit-services/dataloader'; import { FileStorageMiddlewareFactory } from '@via-profit-services/file-storage'; import crypto from 'crypto'; import fs from 'fs'; import path from 'path'; imp...
import cx from 'classnames'; import { createRef, forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState, } from 'react'; import { Waypoint, IWaypointCallbackData, WaypointPosition } from '../waypoint'; import { useCallbackRef } from '../utils/hooks/useCallbackRef'; import is...
import { EditorState } from 'draft-js' import { CSSProperties } from 'react' import { IHorizontalOffsetType, IVerticalOffsetType } from './general' export type IPosition = { x: number; y: number } export type IArea = { start: IPosition; end: IPosition } export type IRange = { start: number; end: number } export typ...
import { existsSync } from 'fs'; import path from 'path'; import { fsReadFile } from '../util/fs'; /** * Parses a .env file and returns and object * with it's values. * If the file is not found, an empty object * is returned. */ async function parseEnvFile( filePath: string, ): Promise<{ [key: string]: string }...
import * as React from "react"; import {observer} from "mobx-react" import ListOutputItem from "./listOutputItem"; import {AppState} from "../../state/appState"; import {FormatterHelper} from "../../helpers/formatterHelper"; import ImportArea from "../importArea"; interface Props { appState: AppState } @observer ...
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Inject, LOCALE_ID, OnDestroy, OnInit } from '@angular/core'; import {ToastrService} from 'ngx-toastr'; import {AppState, GenericAppService} from '@dps/mycms-commons/dist/commons/services/generic-app.service'; imp...
<reponame>ndlib/marble-blueprints import codepipeline = require('@aws-cdk/aws-codepipeline') import codepipelineActions = require('@aws-cdk/aws-codepipeline-actions') import { ManualApprovalAction, GitHubTrigger } from '@aws-cdk/aws-codepipeline-actions' import { PolicyStatement } from '@aws-cdk/aws-iam' import { Topic...
<filename>packages/redspot-gas-reporter/src/reporter/Watcher.ts import { expandMetadata, Metadata } from '@polkadot/metadata'; import { GenericExtrinsic, StorageKey } from '@polkadot/types'; import Table from 'cli-table3'; import { Registry, WsProvider } from 'redspot/types'; import { GasReporterConfig } from '../types...
import React, { useEffect, useState } from 'react'; import { Form, Input, Radio, Checkbox, Select, Col, Row, Space, Button } from 'antd'; import { Rule } from 'antd/lib/form'; import { SelectProps } from 'antd/lib/select'; interface SMFormInterface { (): JSX.Element; readonly reset?: () => void; readonly submit...
<reponame>radziksh/node-typescript-parser<gh_stars>0 import { ArrayBindingPattern, BindingElement, ClassDeclaration, ConstructorDeclaration, Identifier, Node, ObjectBindingPattern, SyntaxKind, } from 'typescript'; import { GetterDeclaration, SetterDeclaration } from '../declarations/Acc...
import { useEffect, useState } from "react"; import { Environment } from "../Environment"; // This file contains code for sending analytics information to segment.io. // This block is boilerplate stuff from segment.io. It is only modified by automatic line breaking and to pass typescript, // to remove the automatic r...
<filename>src/controller.ts import { property, css } from 'lit-element' import { WebComponent } from '@/component' import raf from '@solaldr/raf' import { BaseGroup } from './group' // TODO remove ;(window as any).raf = raf export interface ControllerConstructor { name?: string listen?: boolean target?: Object ...
import { DateTime } from 'luxon'; import React, { FC, useEffect, useState } from 'react'; import { Client, Session, Time } from '@veri-fit/common'; import { Button, TimeOfDay, Week, Weekday, WeekSchedule } from '@veri-fit/common-ui'; import { useParams } from 'react-router-dom'; import Dialog from '../Dialog'; import {...
<filename>src/web3/web3Contract.ts import * as Antd from 'antd'; import debounce from 'lodash/debounce'; import Web3 from 'web3'; import { Method } from 'web3-core-method'; import { Eth } from 'web3-eth'; import { Contract } from 'web3-eth-contract'; import { AbiItem } from 'web3-utils'; import { getGasValue } from 'we...
<reponame>wasamasa/matrix-appservice-irc import { IrcServer } from "../irc/IrcServer"; import Log from "../logging"; const log = Log("QuitDebouncer"); const QUIT_WINDOW_MS = 1000; export class QuitDebouncer { private debouncerForServer: { [domain: string]: { quitTimestampsMs: number[]; ...
<reponame>VitaKaras/nova import { Component, OnInit } from "@angular/core"; import { BandScale, BarRenderer, Chart, ChartAssist, ChartPalette, ChartTooltipsPlugin, CHART_PALETTE_CS_S, getAutomaticDomainWithIncludedInterval, IAccessors, IChartAssistSeries, IChartSeries, IL...
import { join as pathJoin, dirname } from "path"; import * as fs from "fs"; import * as child_process from "child_process"; import * as textColors from "colors"; interface TestValue { type: "i32" | "i64"; value: string; } interface TestInstr { type: "invoke"; field: string; args: TestValue[] } ...
import { join } from "path"; import { existsSync } from "fs"; import { commands, ExtensionContext, ProgressLocation, Uri, window, workspace } from "vscode"; import { IS_WIN, LS_VENV_NAME, GALAXY_LS_PACKAGE, PYTHON_UNIX, PYTHON_WIN, GALAXY_LS_VERSION, REQUIRED_PYTHON_VERSION } from "./constants"; import { execAsync } fr...
import { Node as PMNode } from 'prosemirror-model'; import { tableCellMinWidth, tableNewColumnMinWidth, calcTableColumnWidths, } from '@atlaskit/editor-common'; import { growColumn, shrinkColumn } from './resize-logic'; import { ColumnState, getCellsRefsInColumn, getColumnStateFromDOM, } from './column-stat...
import { Objects } from 'Objects'; import { Ping } from '@rbxts/ping'; import { GroupService, Players, RunService } from '@rbxts/services'; export type RankMapping<T> = { [key: number]: T | undefined }; /** * A utility class that allows allocation of * identifiers to players depending on their * rank in a Roblox ...
import { Field, PrivateKey, PublicKey, SmartContract, state, State, method, UInt64, Party, Poseidon, UInt32, Circuit, } from 'snarkyjs'; import { SignatureWithName, Account, SignatureWithSigner } from "./contract_type"; import { AccountDb, checkProof } from "./mock"; export { ZKPass, validate...
<gh_stars>0 import { Client, Intents, TextChannel } from 'discord.js' import { Reminder } from './typings.js' import Config from './config/config.js' import { removeReminder, getAllReminders, remindersCommand } from './commands/reminders.js' import { acronymCommand } from './commands/acronym.js' import { crocComman...
import { popularSearchesSql, toolsSql } from 'configurations/nf/resources' import Layout from 'portal-components/Layout' import * as React from 'react' import { Button, Form } from 'react-bootstrap' import { Typography } from 'synapse-react-client' import FeaturedToolsList from 'synapse-react-client/dist/containers/hom...
/* eslint-disable @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-unsafe-return */ import Redis from 'ioredis'; import crypto from 'crypto'; import { delay } from 'util/promise'; import { hourMs, secondMs } from 'util/date'; import lockFactory from 'util/memoizer-redis/lock'; // https://gith...
import React, { PureComponent } from 'react' import { connect } from 'react-redux' import { normalizeUrl } from '@worldbrain/memex-url-utils' import EventEmitter from 'events' import { runInBackground } from 'src/util/webextensionRPC' import SidebarContainer, { SidebarContainer as AnnotationsSidebar, } from 'src/i...
import { peek } from "@thi.ng/arrays"; import { isString } from "@thi.ng/checks"; import { Border, TableOpts } from "./api"; import { beginClip, beginStyle, Canvas, canvas, endClip, endStyle, setAt, } from "./canvas"; import { hline, vline } from "./hvline"; import { fillRect, strokeRect } f...
<gh_stars>0 import { EventEmitter } from "events"; import type Lavalink from "@lavaclient/types"; import type WebSocket from "ws"; export class Structures { static extend<K extends keyof Classes, E extends Classes[K]>( name: K, extend: (base: Classes[K]) => E ): E; static get<K extends keyof Classes>(nam...
import React, { useEffect, useState } from 'react' import { makeStyles, createStyles } from '@material-ui/core' import { Close } from '@material-ui/icons' import { IThemeStyle } from '../../../styles/theme' import { IItemDefautlProps, IInputProps } from '../../../types/item.types' import { IUser } from '../../../type...
import {UniFunction, checkStrictlyIncreasing, trimPoly, evaluatePolySegment} from "./Utils"; const EPSILON = Number.EPSILON; /** * Returns a function that computes a cubic spline interpolation for the data * set using the Akima algorithm, as originally formulated by <NAME> in * his 1970 paper "A New Method of Interpo...
<reponame>pete85/angular<filename>forms/src/app/forms/signup-form-reactive/signup-form-reactive.component.ts import {Component, OnInit} from '@angular/core'; // REACTIVE FORM BUILDING BLOCKS // FormGroup is used as a data type for form model. Root FormGroup is the form itself. import {FormGroup, FormBuilder, Validator...
<filename>src/utility/pathFinder.ts import _ from "lodash"; const walkableStructureTypes = new Set<StructureConstant>([ STRUCTURE_ROAD, STRUCTURE_CONTAINER, ]) function evadeBlockers(room: Room, cost: CostMatrix): void { const blockers = _([ room.find(FIND_CREEPS), room.find(FIND_STRUCTURE...
<filename>packages/ra-core/src/controller/list/useListController.ts import { isValidElement, useEffect, useMemo } from 'react'; import { UseQueryOptions } from 'react-query'; import { useAuthenticated } from '../../auth'; import { useTranslate } from '../../i18n'; import { useNotify } from '../../notification'; import...
/* eslint-disable @typescript-eslint/no-non-null-assertion */ import * as React from 'react'; import _ from 'lodash'; import { Button, Confirm, Header, Segment } from 'semantic-ui-react'; import { Redirect, useHistory, useParams, withRouter } from 'react-router-dom'; import { Form, Formik } from 'formik'; import * as Y...
import React, { CSSProperties } from 'react'; import { Button } from 'semantic-ui-react'; import AceEditor from 'react-ace'; import 'brace/mode/groovy'; import 'brace/theme/monokai'; import 'brace/ext/searchbox'; import axios from 'axios'; import PontusComponent from './PontusComponent'; import { PVNamespaceProps } fr...
import BatteryChargingFullIcon from '@mui/icons-material/BatteryChargingFull'; import CameraFrontIcon from '@mui/icons-material/CameraFront'; import DeleteIcon from '@mui/icons-material/Delete'; import DirectionsRunIcon from '@mui/icons-material/DirectionsRun'; import LeakAddIcon from '@mui/icons-material/LeakAdd'; imp...
// tslint:disable:member-ordering import { HierarchyNode } from 'd3-hierarchy'; import { ICallFrame, ICpuProfileNode } from '../trace'; import { Archive } from './archive_trace'; import { ParsedFile } from './metadata'; import { ModuleMatcher } from './module_matcher'; import { Categories, Locator } from './utils'; e...
import { Octokit } from "@octokit/core" import { existsSync, mkdtempSync, readFileSync, writeFileSync } from "fs" import { tmpdir } from "os" import fetch from "cross-fetch" import YAML from "yaml" import shell from "../utils/shell" import inputs from "./inputs" import YamlConfig from "../types/yaml" // create a tem...
<filename>src/core/server/legacy_compat/__tests__/legacy_platform_proxifier.test.ts /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch B.V. licenses this fi...
import React from 'react' import { View, Text, Image, ActivityIndicator, FlatList, Dimensions, useWindowDimensions, } from 'react-native' import { useSafeAreaInsets } from 'react-native-safe-area-context' import { defaultColors } from '@berty-labs/styles' import { useGomobileIPFS } from '@berty-labs/react-redux...
/** * Copyright 2018 Shift Devices AG * * 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 agr...
import React, { useEffect, useRef, useState } from 'react'; import styled, { css, keyframes } from 'styled-components'; import { useSelector } from 'react-redux'; import { selectSlide } from 'state/reducers/navigation'; interface SlideProps { color: string; show: boolean; } const StyledSlide = styled.div` position...
import React, {Component} from "react"; import Card from "react-bootstrap/Card"; import Button from "react-bootstrap/Button"; import {FontAwesomeIcon} from "@fortawesome/react-fontawesome"; import {faSearch, faTrash} from "@fortawesome/free-solid-svg-icons"; import FileUpload from "../../../components/FileUpload/FileUp...
import { getInsideWidth, getOutsideWidth } from './SizeCalculation'; export interface OverflowMenuInterface { /** * Calculates the container width and moves items that will not fit to the overflow menu. Item * sizes are not calculated here, if item sizes need to be updated call {@link refreshSizes} * first...
<filename>app/stopwatch/static/stopwatch/js/timer_ws.ts<gh_stars>0 /* * Copyright 2019-2021 <NAME> * * 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/license...
<reponame>egonix/extraterm /* * Copyright 2018 <NAME> <<EMAIL>> * * This source code is licensed under the MIT license which is detailed in the LICENSE.txt file. */ import _ = require('lodash'); import * as child_process from 'child_process'; import * as fse from 'fs-extra'; import * as constants from 'constants'; ...
<gh_stars>1-10 import path from 'path'; import fs from 'fs'; import os from 'os'; import { ErrorLog, OperationLog } from '../../Functions/log'; import trash from 'trash'; import { v4 } from 'uuid'; import mv from 'mv'; import { dialog } from '@electron/remote'; const UNIX_TRASH_FILES_PATH = path.join( os.homedir(), '...
export enum Mode { Signature = 1 << 0, Application = 1 << 1, } export class Op { public constructor( public value: string, /** * the modes where this op is available. */ public mode: number, public minVersion: number ) {} public toString(): string { return this.value; ...
<gh_stars>0 import { Component, OnInit, OnDestroy, Inject } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; import { LocalStorageService } from 'angular-2-local-storage'; import * as moment_ from 'moment'; import { PipSidenavService, PipRightnavService } from 'pip-webui2-layouts'; import {...
import GedcomX from "./gedcomx"; import config from "../config"; import {graphModel} from "./ModelGraph"; export enum view { DEFAULT = "", ALL = "all", LIVING = "living", ANCESTORS = "ancestors", DESCENDANTS = "descendants" } export interface GraphObject { type width height viewId data } export c...
<reponame>CUP-ACM-Programming-Club/CUP-Online-Judge-Express import {MySQLManager} from "../mysql/MySQLManager"; import {Request} from "express"; import Cacheable from "../../decorator/Cacheable"; import CachePool from "../../module/common/CachePool"; import {ErrorHandlerFactory} from "../../decorator/ErrorHandler"; imp...
import React from 'react'; import Card from '@material-ui/core/Card'; import CardHeader from '@material-ui/core/CardHeader'; import CardMedia from '@material-ui/core/CardMedia'; import CardContent from '@material-ui/core/CardContent'; import CardActions from '@material-ui/core/CardActions'; import Collapse from '@mater...
import type { Model, Node } from '@antv/x6' import type { HookHub } from '@antv/xflow-hook' import type { NsGraph } from '../../interface' import type { IHooks } from '../../hooks/interface' import type { IArgsBase } from '../../command/interface' import type { NsNodeCmd } from '../interface' import { inject, injectab...
import React from 'react'; import { useForm } from 'react-hook-form'; import Avatar from '@material-ui/core/Avatar'; import Container from '@material-ui/core/Container'; import EditOutlinedIcon from '@material-ui/icons/EditOutlined'; import Grid from '@material-ui/core/Grid'; import TextField from '@material-ui/core/Te...
import {PropertyRef} from './PropertyRef'; import {IEntity} from './IEntity'; import * as _ from 'lodash'; import {assign, defaults} from 'lodash'; import {XS_P_$LABEL} from '@typexs/server/libs/Constants'; import { DefaultEntityRef, IClassRef, IEntityRef, IJsonSchemaSerializeOptions, ILookupRegistry, JsonSc...
import React from 'react'; import { auth, remote, ApiConfig, ApiScope, SpotifyRemoteApi, PlayerState, PlayerContext, RepeatMode, ContentItem, SpotifyAuth, } from 'react-native-spotify-remote'; import { SPOTIFY_CLIENT_ID, SPOTIFY_REDIRECT_URL, SPOTIFY_TOKEN_REFRESH_URL, SPOTIFY_TOKEN_SWAP_URL...
<filename>source/base/mage.ts import AL, { Character, Entity, Mage, MonsterName, SlotType, TradeItemInfo, TradeSlotType } from "alclient" import FastPriorityQueue from "fastpriorityqueue" const CBURST_WHEN_HP_LESS_THAN = 200 export async function attackTheseTypesMage(bot: Mage, types: MonsterName[], friends: Characte...
import dateFormat from 'dateformat' import { History } from 'history' import update from 'immutability-helper' import { userInfo } from 'os' import * as React from 'react' import { Button, Checkbox, Divider, Grid, Header, Icon, Input, Image, Loader } from 'semantic-ui-react' import { getUserInfo } fr...
// Copyright 2019-2020 @Premiurly/polkassembly authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import { ThemeProvider } from '@xstyled/styled-components' import React from 'react' import { BrowserRouter as Router, R...
import { useRdxContext, getAtomFamilyPrefix, stringify } from '@alife/rdx' import { useFormId } from '../../utils/base' import { getChlidFieldInfo, getEmptyValue } from '../../utils/functions' export interface IArrayMutators { // 新增一个 push: (newValue: any) => void // 最前面新增一个 unshift: (newValue: any) => void ...
import React, { useEffect } from 'react'; import { RouteComponentProps, useHistory } from 'react-router-dom'; import type { FilterAutoMongoKeys, PostContent, PostUserInfo, SelectedGenre, Services, ShelfEntry, User, } from '@caravanapp/types'; import { Button, CircularProgress, Container, makeStyl...
<reponame>UrbanCompass/thrift-typescript import * as path from 'path' import * as ts from 'typescript' import { FieldDefinition, FieldType, FunctionDefinition, SyntaxType, ThriftStatement, } from '@creditkarma/thrift-parser' import { Resolver } from '../../resolver' import { DefinitionType, INames...
import * as mm from 'mingru-models'; import { ActionIO } from './actionIO.js'; import { ParamList, ValueList } from '../lib/varList.js'; import { actionToIO, registerHandler } from './actionToIO.js'; import * as defs from '../def/defs.js'; import { VarDef } from '../lib/varInfo.js'; import BaseIOProcessor from './baseI...
<reponame>Xunnamius/git-add-then-commit<gh_stars>1-10 export type Path = { [K in keyof typeof Paths]: string }; export type PathActual = string[] & { actual: string[] }; // ? The paths as they might appear in the command `git add paths` const Paths = { single: ['file1.json'] as PathActual, short: ['path'] as PathA...
<filename>src/osmd/getEntities.ts import { OpenSheetMusicDisplay, GraphicalMeasure, GraphicalStaffEntry, GraphicalVoiceEntry, GraphicalNote, VerticalGraphicalStaffEntryContainer, } from "opensheetmusicdisplay"; import uniqid from "uniqid"; export type MusicSystemData = { index: number; x: number; y: ...
import React, { Component } from 'react'; import { inject, observer } from 'mobx-react'; import { withRouter, Link } from 'react-router-dom'; import { Post, Followers, ScrollTop } from '../components'; import { FollowersStore } from '../stores'; type ProfileProps = { match?: any; history?: any; ProfileStor...
import * as React from 'react'; import { mapLimitsRequests } from '@odf/shared/charts'; import { AreaChart } from '@odf/shared/dashboards/utilization-card/area-chart'; import { ColoredIconProps, Humanize, PrometheusResponse, RedExclamationCircleIcon, TopConsumerPopoverProps, YellowExclamationTriangleIcon, }...
<gh_stars>0 import { EventEmitter } from 'events'; import { ShowMdApp } from '../app'; import parseArgs, { ParsedArgs } from 'minimist'; export enum ShowMdCommand { HELP = 'help', ROOT = 'root', BUILD = 'build', STATUS = 'status', START = 'start', STOP = 'stop', EXIT = 'exit', } export class ShowMdCmdPa...
import Bottleneck from "bottleneck"; import { ConstructorParams, ExecuteParameters, ExecuteRequestParameters, LimitType, PlatformId, RateLimits, METHODS, HOST, } from "./@types"; import { extractMethod, extractRegion } from "./extractor"; import { createRateLimiters, createRateLimitRetry, synchron...
import { SingleLanguageLabels } from "./index" const slovakLabels: SingleLanguageLabels = { essay: { exampleAnswerLabel: "Vzorová odpoveď", userAnswerLabel: "Vaša odpoveď", currentNumberOfWordsLabel: "Počet slov", textFieldLabel: "Vaša odpoveď", conformToLimitsToSubmitLabel: "Aby ste mohli ...
<filename>client/store/categories.ts import { Dispatch } from 'redux'; import { produce } from 'immer'; import { assert, assertDefined, localeComparator, NONE_CATEGORY_ID, translate as $t, } from '../helpers'; import { Category } from '../models'; import DefaultCategories from '../../shared/default...
import React, { Component, ComponentType, useContext } from 'react'; import { withRouter, RouteComponentProps } from 'react-router-dom'; import { Location } from 'history'; import { withTranslation, WithTranslation } from 'react-i18next'; import BurnerCore from '@burner-wallet/core'; import { Diff, BurnerComponents, ...
import { CaseCreator, CaseType, Data } from "@ot-builder/prelude"; import { OtVar } from "@ot-builder/variance"; import * as GeneralGlyph from "../general-glyph"; import * as Lib_General_Point from "../general-glyph/point/ref"; import * as TAG_GeometryType from "../general-glyph/type-tags/geometry-type"; import * as T...
import { Action, Reducer } from 'redux'; import { AppThunkAction } from '.'; import { getStoredVerifiedEmail, getStoredAuthToken, UserLoggedOutAction, OpenLoginModalAction } from './UserStore'; import { ReceiveFursvpEventAction } from './EventDetailStore'; import { History } from 'history'; import { DateTime } from 'l...
/** * Copyright 2020 Opstrace, 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 applicable law or agree...
import { Component, OnInit } from '@angular/core'; declare const AmCharts: any; import '../../../../assets/charts/amchart/amcharts.js'; import '../../../../assets/charts/amchart/gauge.js'; import '../../../../assets/charts/amchart/pie.js'; import '../../../../assets/charts/amchart/serial.js'; import '../../../../asse...
/*--------------------------------------------------------------------------------------------- * Copyright (c) IBAX All rights reserved. * See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as React fro...
<filename>src/components/visualizations/SearchTree.ts import * as d3 from "d3"; import $ from "jquery"; import * as clipboard from "clipboard-polyfill" import AnalyticsUtil from "./../../business/analytics/AnalyticsUtil"; /** * Constructs a Searchtree object * * @param {Tree} t The JSON representation of the tree ...
import { AfterViewInit, Component, ElementRef, EventEmitter, HostListener, Inject, InjectionToken, OnDestroy, Renderer2, ViewChild } from '@angular/core'; import { MatIconRegistry } from '@angular/material/icon'; import { DomSanitizer } from '@angular/platform-browser'; import { ElementDisplayPosition, ElementDisplayS...
<filename>src/libs/use-asset-swap/index.tsx import { useEffect, useState } from 'react'; import { normalize, valueToBigNumber, API_ETH_MOCK_ADDRESS } from '@aave/protocol-js'; import { useDebouncedCallback } from 'use-debounce'; import { useStaticPoolDataContext } from '../pool-data-provider'; import { IBaseUniswapAda...
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *---------------------------------------------------------------...