text
stringlengths
3.08k
15.5k
const KEYBINDING_NAMESPACE = "layer-hotkeys"; export function init() { Hooks.once("init", async () => { const DEFAULT_KEYS_LAYER = { token: "KeyQ", measure: "KeyM", tiles: "KeyT", drawings: "KeyD", walls: "KeyW", lighting: "KeyL", sounds: "KeyS", notes: "KeyN", ...
<gh_stars>0 import { Component, ElementRef, ViewChild, OnInit, OnDestroy } from "@angular/core"; import { alert, prompt } from "tns-core-modules/ui/dialogs"; import { Page, EventData } from "tns-core-modules/ui/page"; import { RouterExtensions } from "nativescript-angular/router"; import { User } fr...
<gh_stars>1-10 'use strict'; import * as Debug from 'debug'; import * as express from 'express'; import * as path from 'path'; import * as url from 'url'; import * as helmet from 'helmet'; import * as isIpPrivate from 'private-ip'; import * as checkForPhishing from 'eth-phishing-detect'; import * as dateFormat from 'd...
// package: // file: client.proto import * as jspb from "google-protobuf"; import * as node_pb from "./node_pb"; import * as vscode_pb from "./vscode_pb"; export class ClientMessage extends jspb.Message { hasMethod(): boolean; clearMethod(): void; getMethod(): node_pb.Method | undefined; setMethod(value?: no...
/** @format */ // Type definitions for Web Speech API - 18 August 2020 Draft // Project: https://wicg.github.io/speech-api/#api_description // Definitions by: <NAME> https://github.com/EffinMaggie /*~ This types the APIs exposed by some browsers as part of the Web Speech API *~ suite, comprised of SpeechRecognition, ...
<reponame>coderextreme/XREngine import { CollisionGroups, DefaultCollisionMask } from '../enums/CollisionGroups' import { ShapeType, SHAPES, Body, BodyType, PhysXInstance } from 'three-physx' import { Vector3, Quaternion, CylinderBufferGeometry, Mesh, MeshNormalMaterial } from 'three' import { ConvexGeometry } from '.....
<filename>index.ts import crypto from 'crypto'; import { sep, dirname } from 'path'; import { appendFileSync, existsSync, mkdirSync, writeFileSync, readFileSync, readdirSync, unlinkSync } from 'fs'; import { AllHtmlEntities } from 'html-entities'; import fetch from 'node-fetch'; import { ArgumentParser, Const } from 'a...
import { View, Text, Select, CheckIcon, Button, ScrollView } from "native-base"; import React from "react"; // @ts-ignore import SelectBox from "react-native-multi-selectbox"; import { xorBy } from "lodash"; // TODO: Use this instead import { Dropdown } from "react-native-element-dropdown"; import { Picker } from "@rea...
<reponame>yasir2000/brown-bear<gh_stars>1-10 /** * Copyright (c) BrownBear, 2022 - present. All Rights Reserved. * * This file is a part of Tuleap. * * Tuleap is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundat...
<reponame>origin1tech/colurs<filename>src/interfaces.ts export interface IColursChain extends IColursStyle { (): boolean; (str: any, ...args: any[]): any; } export interface IColursStyle { // modifiers reset?: IColursChain; bold?: IColursChain; dim?: IColursChain; italic?: IColursChain; underline?: I...
import chalk from 'chalk'; import { Argv, Options } from 'yargs'; import CommandHelper from './CommandHelper'; import configurationHelperFactory from './configurationHelper'; import HelperFactory from './Helper'; import { CommandError, CommandWrapper, GroupMap, CommandMap } from './interfaces'; import { formatHelp } fr...
import React, { Component, ReactNode, } from 'react'; import { hot } from 'react-hot-loader/root'; import { setConfig } from 'react-hot-loader'; setConfig({ logLevel: 'debug', ignoreSFC: true, pureRender: true, }); import { Home, Counter, Header, Auth, Account, } from '@components'; import { I...
<reponame>AuroralH2020/auroral-nm /* eslint-disable import/first */ /* eslint-disable no-multi-str */ import * as items from '../../src/core/items' import { IItem, IItemDocument, ItemPrivacy, ItemStatus, ItemType } from '../../src/persistance/item/types' import { OrganisationModel } from '../../src/persistance/organisa...
// pkgs: installed libs like react, axios etc.. import { useEffect } from 'react'; import { Redirect, Route, Switch, useLocation } from 'react-router-dom'; import { useDispatch } from 'react-redux'; // utils: utilities that you prepared your self import './common/styles/app.sass'; import { jwtDecoder } from './...
import * as Tmp from 'tmp'; import * as Path from 'path'; import * as Fs from 'fs-extra'; import * as ChildProcess from 'child_process'; import { type } from 'os'; // This should be defined BEFORE we load utils process.env.TORTILLA_CWD = Tmp.dirSync({ unsafeCleanup: true }).name; // process.env.DEBUG = '1'; import { ...
<filename>packages/common/src/Shape.ts<gh_stars>10-100 import { select as d3Select } from "d3-selection"; import { SVGWidget } from "./SVGWidget"; import "../src/Shape.css"; export class Shape extends SVGWidget { protected _tooltipElement; constructor() { super(); } contains(point) { ...
/** * this plugin adds the RxCollection.syncGraphQl()-function to rxdb * you can use it to sync collections with remote graphql endpoint */ import type { Observable } from 'rxjs'; import GraphQLClient from 'graphql-client'; import objectPath from 'object-path'; import { flatClone } from '../../util'; impor...
<gh_stars>0 import { RequestOptionsArgs } from '@angular/http/src/interfaces'; import { URLSearchParams } from '@angular/http'; import { Observable } from 'rxjs'; import { LocalDataSource } from 'ng2-smart-table'; import { getDeepFromObject } from './helpers'; import { RequestPagesModel } from '../Model/Dto'; import ...
import { ComponentFixture, TestBed, waitForAsync } from "@angular/core/testing"; import { FormBuilder } from "@angular/forms"; import { ActivatedRoute, Router } from "@angular/router"; import { of } from "rxjs"; import { ActivatedRouteStub } from "../../../../test/stub-services/activated-route-stub"; import { TestConfi...
// Copyright (c) GitHub, Inc. // Copyright (c) 2017 <NAME> // MIT License, see LICENSE file for full terms. export enum StatusItemKind { BranchCommitHeader = 0, BranchHeadHeader, BranchUpstreamHeader, BranchAheadBehindHeader, UnknownHeader, Entry } export interface IBranchCommitStatusHeader { kind: Stat...
<reponame>venkatpolisetti/crm-sfdx-plugin<filename>src/commands/crm/permset/assign.ts import { core, flags, SfdxCommand } from '@salesforce/command'; import * as _ from 'lodash'; import chalk from 'chalk'; core.Messages.importMessagesDirectory(__dirname); const messages = core.Messages.loadMessages('@venkat.polisetti/...
/* * Created on Tue Jun 30 2020 * * Copyright (c) storycraft. Licensed under the MIT Licence. */ import { LoginAccessDataStruct } from "../talk/struct/auth/login-access-data-struct"; import { LoginError } from "../client"; import * as crypto from "crypto"; import { Configuration } from "../configuration"; import {...
<reponame>ringcentral/engage-voice-client-js<gh_stars>1-10 import axios, { AxiosInstance } from 'axios' import { SDK, LoginOptions } from '@ringcentral/sdk' import { URL } from 'url' import { EventEmitter } from 'events' import { Options, Token, Config, Data } from './types' const version = process.env.version /* ist...
import { FIVE_MINUTES, fromMiliseconds, toMiliseconds } from "@walletconnect/time"; import { SignClientTypes, RelayerClientMetadata, EngineTypes } from "@walletconnect/types"; import { getDocument, getLocation, getNavigator } from "@walletconnect/window-getters"; import { getWindowMetadata } from "@walletconnect/window...
<reponame>aex351/frontend import { HighlightStyle, tags } from "@codemirror/highlight"; import { EditorView as CMEditorView } from "@codemirror/view"; import { StreamLanguage } from "@codemirror/stream-parser"; import { jinja2 } from "@codemirror/legacy-modes/mode/jinja2"; import { yaml } from "@codemirror/legacy-modes...
import { red } from '@material-ui/core/colors' import { createStyles, Theme } from '@material-ui/core' const orange = '#F2A74B' const textLight = '#eaf2f4' const textDark = '#0D0D0D' const borderLight = 'rgba(206,212,218, .993)' export const main = (theme: Theme) => createStyles({ dropzone: { backgroundCo...
import { Box, Button, Flex, Icon, Text, Textarea, useToast, } from "@chakra-ui/react"; import React from "react"; import ComplexitySlider from "../../components/Slider"; import { alphabet, alphCamo } from "../cryptos"; import { BsClipboardCheck, BsPencil } from "react-icons/bs"; const getCamo = (char: s...
import React, {memo, useCallback, useEffect, useState} from 'react'; import { ScrollView, StyleSheet, Text, TouchableOpacity, View, } from 'react-native'; import {useNavigation} from '@react-navigation/native'; import ROUTES from 'app/ultis/routes'; import SvgIconInfo from'app/svgs/SignUp/SvgIconInfo'; import...
/** * "J" stands for JSON, and {@link JDesign} is the saving format of a {@link Design} (a.k.a. "Project"). * * Being JSON format, it's easy to incorporate any Unicode characters. * * Entries marked with @session implies that it is for session only, and will not be included in the .bps file. */ interface JDesign...
<reponame>ryanardo/conversationai-moderator /* Copyright 2017 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 Unless required by applicab...
<reponame>infanf/homer import axios from "axios"; import { Config } from "../config"; import debug from "debug"; import { EmployeeStateChange } from "../webhooks"; import { States } from "../models/ActivityEntity"; const log = debug(`app:slack-webhook-impl`); let slackApiUrl: string = null; let slackChannel: string =...
// deno-fmt-ignore import { BoolArray, ByteStringArray as _ByteStringArray, UnicodeStringArray as _UnicodeStringArray } from "./custom-arrays"; import type { ChunkQueue, DataType, Indices, Slice, TypedArray, TypedArrayConstructor, } from "../types"; export function json_encode_object(o: Record<string, any>): Ui...
import { GameParams, GameSession, GameSessionUpdate, UpdateTypes, BonusBalances, } from './models'; import { WAIT_ACTION_DURATION } from './constants'; import { Api } from './interfaces'; import { Callback, EventEmitter } from './eventEmitter'; export const parseBet = (str: string): number => p...
import { Box, Button, ChakraTheme, Flex, GridItem, Heading, useTheme, } from "@chakra-ui/react" import { AnimatePresence, motion } from "framer-motion" import { graphql } from "gatsby" import { GatsbyImage, getImage } from "gatsby-plugin-image" import { MDXRenderer } from "gatsby-plugin-mdx" import React,...
<filename>packages/almin/test/UseCase-test.ts // LICENSE : MIT "use strict"; import { SinonStub } from "sinon"; import { Context, DispatchedPayload, Dispatcher, ErrorPayload, UseCase } from "../src"; import { TYPE as CompletedPayloadType } from "../src/payload/CompletedPayload"; import { TYPE as DidExecutedPayloadType ...
<filename>packages/ipfs-daemon/src/create-ipfs.ts import * as dagJose from 'dag-jose' import { path } from 'go-ipfs' import * as Ctl from 'ipfsd-ctl' import * as ipfsClient from 'ipfs-http-client' import type { Options } from 'ipfs-core' import { create as createJsIpfs } from 'ipfs-core' import getPort from 'get-port' ...
import { useCallback, useEffect } from "react"; import { useHistory } from "react-router-dom"; import { toast } from "react-toastify"; import { Button, Grid, Segment } from "semantic-ui-react"; import { useCreateBookings } from "../../custom-hooks/api/bookings-api"; import { useAppDispatch, useAppSelector } from "../....
/** * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt odlux * ================================================================================================= * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. Al...
import ws281x, { Ws281x } from 'rpi-ws281x-native'; import { A_COLOR, COLOR } from '../../shared/constants/colors.const'; import { rgbInt2grbInt } from '../../shared/helpers/rgbInt2grbInt'; import { TypedEventEmitter } from '../../shared/helpers/typed-event-emitter.helper'; import { LEDStripEventMap, LED_STRIP_EVENT } ...
/* ISC License (ISC) Copyright 2019-2020 <NAME> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS A...
require("dotenv").config(); import * as bodyParser from "body-parser"; import express from "express"; import session from "express-session"; import { v4 as uuid } from "uuid"; import { Request, Response } from "express"; import { XeroClient } from "xero-node"; import { sequelize } from "./models/index"; import cookiePa...
import { MockedResponse } from '@apollo/client/testing'; import React from 'react'; import { PAGE_SIZE } from '../../../../../../common/components/imageSelector/constants'; import { MAX_PAGE_SIZE, TEST_USER_ID } from '../../../../../../constants'; import { ImagesDocument, OrganizationsDocument, UserDocument, } f...
<reponame>tycloud97/cardstack import { InputValidationState } from '@cardstack/boxel/addon/components/boxel/input/validation-state'; import { ImageUploadSuccessResult } from '@cardstack/web-client/components/image-uploader'; import config from '@cardstack/web-client/config/environment'; import { WorkflowCardComponentAr...
import styled from 'styled-components' import * as Lib from '.'; export const Explorer = styled.div<Pick<Lib.T.Explorer, 'styling'>>` background-color: ${({ styling: s }) => s?.background || '#16191e'}; padding: 0 5px 0 0; float: left; width: 100%; height: 100%; > div.explorerContainer { width: calc(1...
<filename>src/lottie.ios.ts /********************************************************************************** * (c) 2017, <NAME>. * Licensed under the MIT license. * * Version 1.0.0 <EMAIL> *********************************************************************************...
export type AvailableCatalogs = "ARCHITECTURAL" | "OUTDOOR" | "DECORATIVE"; export type AvailableEntryStatus = | "Published" | "Changed" | "Draft" | "Archived"; /** * Not empty array type * * @example * const okay: NonEmptyArray<number> = [1, 2]; * const alsoOkay: NonEmptyArray<number> = [1]; * const er...
import React from 'react'; import { render, screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import MockAdapter from 'axios-mock-adapter'; import { Behandling, AlleKodeverk, Fagsak, Aksjonspunkt, } from '@fpsak-frontend/types'; import fagsakYtelseType from '@fpsak...
<gh_stars>0 import * as fs from "fs"; import { promisify } from "util"; import { exec as execCommand } from "child_process"; import * as glob from "glob"; import * as uglifyJS from "uglify-js"; import { ncp } from "ncp"; import * as chokidar from "chokidar"; import * as stylus from "stylus"; import * as stylus_autopr...
import React from 'react'; import styled from 'styled-components'; import { DateTime, Flag, Flexbox, Number } from '../../..'; import { FlexPropsType } from '../shared/shared.types'; import FlexTable from '../FlexTable'; import docs from '../FlexTable.mdx'; export default { title: 'Molecules / FlexTable / With Custo...
<reponame>javiertury/redsys-easy<gh_stars>10-100 import Koa from 'koa'; import bodyParser from 'koa-bodyparser'; import KoaRouter from '@koa/router'; import Decimal from 'decimal.js'; import { createRedsysAPI, TRANSACTION_TYPES, randomTransactionId, SANDBOX_URLS, isResponseCodeOk, CURRENCIES } from 'redsys...
<filename>packages/core/utils/src/domApis.ts import { makeMap } from './utils'; import { rawRemoveChild } from './raw'; export interface VText { type: 'text' | 'comment'; content: string; } export interface VNode { key?: string; type: 'element'; tagName: string; children: Array<VNode | VText>; attribute...
import { GAME_KEY } from 'app/gameConstants'; import { createAnimation } from 'app/utils/animations'; import { requireImage } from 'app/utils/images'; import { Frame } from 'app/types'; /*const font = requireImage('gfx/simpleFontWhite.png'); const simpleFontString = ' !"#$%&\'()*+,-./0123456789' + ':;<=>?@ABCDEF...
<filename>packages/swiper/hooks.ts import { useState, useCallback, useRef, useEffect, } from 'react'; import { SlidesStateType, ISwiper } from '@rhight/swiper'; import { calcActiveSlide, getLeftCoordinate, calcSlidesWidth } from './utils'; type GoToSlideType = (nextIndex: number, withoutAnimation?: boolean, ...
import { readFileSync, WriteStream } from 'fs'; import { EventEmitter } from 'events'; import { LaunchRequestArguments } from './OctaveDebugAdapter'; import { Writable } from 'stream'; import { OctaveDebuggerSession } from './OctaveSession'; import * as Vscode from 'vscode'; import * as Path from 'path'; import * as Fs...
<reponame>sindilevich/connection-string-parser<gh_stars>1-10 // MIT License // Copyright (c) 2018 <NAME> // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including wi...
<filename>x-pack/plugins/ml/public/application/components/job_selector/job_select_service_utils.ts /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the ...
/** * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
import React, { FC, useContext, useMemo, useState, ChangeEvent } from "react"; import { Paper, Typography, Grid, ExpansionPanel, ExpansionPanelSummary, ExpansionPanelDetails, Checkbox, FormGroup, FormControlLabel, Collapse, TextField } from "@material-ui/core"; import { FilterList, ExpandMore } fr...
import * as fs from 'fs'; import * as path from 'path'; import minify_html from './utils/minify_html'; import { create_compilers, create_app, create_manifest_data, create_serviceworker_manifest } from '../core'; import { copy_shimport } from './utils/copy_shimport'; import read_template from '../core/read_template'; im...
import { exec } from 'child_process'; import { handleExecOut } from './promiseExec'; import { handleFunc } from './promiseFunc'; import * as types from './types'; import { IObjCMD, IObjCMDCatch, IObjCMDFunc, IObjCMDExec, TProcess, TGetMsg, TSync, TSyncTry, TSyncCatch, IObjError } from './types'; i...
import React, { useState, useEffect, Fragment } from "react"; import PropTypes from "prop-types"; import { makeStyles } from "@material-ui/core/styles"; import { Drawer, SwipeableDrawer } from "@material-ui/core"; import DrawerMenuBase from "./DrawerMenuBase"; import { DrawerBaseProps } from "../../types/DrawerBaseProp...
import { HardPoint, HardPointEquipment } from './Hardpoint'; import { Equipment, EquipmentTypes } from './Equipment'; import { TriggeredEquipment } from './TriggeredEquipment'; import { CurrentStatusChange } from './StatusChanges'; import { Manufacturers } from '~/utilities/Manufacturers'; export class HardpointEquipm...
import React from "react"; import styled from "styled-components"; type Props = { id?: string; hintId?: string; required?: boolean; disabled?: boolean; readOnly?: boolean; autoFocus?: boolean; name: string; value?: string; checked?: boolean; onChange?: React.InputHTMLAttributes<HTMLInputElement>["o...
<reponame>chandrakanthm/fabric-integration<gh_stars>0 /** * Copyright 2019 American Express Travel Related Services Company, 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 * * ht...
<filename>src/app/sharepoint-rest.service.ts import { Injectable } from '@angular/core'; import { HttpClient, HttpRequest } from '@angular/common/http'; import { flatMap, shareReplay, switchMap } from 'rxjs/operators'; import { of, Observable } from 'rxjs'; import { v4 } from 'uuid'; interface IContextInfo { Expir...
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. import React from 'react'; import {autocompleteCustomEmojis} from 'mattermost-redux/actions/emojis'; import {getEmojiImageUrl} from 'mattermost-redux/utils/emoji_utils'; import {getEmojiMap, getRecentEmoji...
<reponame>naftalimurgor/lib import { ethChainId } from '@shapeshiftoss/caip' import { ChainAdapter, ChainAdapterManager } from '@shapeshiftoss/chain-adapters' import { foxyAddresses, FoxyApi } from '@shapeshiftoss/investor-foxy' import { ChainTypes, HistoryData, HistoryTimeframe, MarketCapResult, MarketData, ...
// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS Managed Message Queue */ export interface MqConfigurationConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/...
<gh_stars>10-100 // MIT © 2017 azu // MIT © <NAME> // Original https://github.com/zkochan/rcfile import path from "path"; import fs from "fs"; const debug = require("debug")("rc-config-loader"); const requireFromString = require("require-from-string"); const JSON5 = require("json5"); const defaultLoaderByExt = { ...
/* eslint-disable no-empty */ import { Badge, Box, Button, Container, FormControl, FormLabel, GridItem, Heading, Input, SimpleGrid, Switch, Text, } from '@chakra-ui/react' import Layout from 'components/layout' import DeleteAccount from 'components/profile/delete-account' import Photo from 'comp...
<gh_stars>0 // generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS EC2 */ export interface EipAssociationConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/eip_a...
import React, { useState, useContext, useEffect } from 'react'; import Box from '@material-ui/core/Box'; import Checkbox from '@material-ui/core/Checkbox'; import FormControl from '@material-ui/core/FormControl'; import FormLabel from '@material-ui/core/FormLabel'; import FormControlLabel from '@material-ui/core/FormCo...
<gh_stars>0 /* Given microservice with customized gateway protocol of error delivering success: {ok: true, data} fail with AppServiceError: {ok: false, data} exeption with regular Error: new Error(msg) And start method was called and the microservice start listening ...
/* eslint-disable */ import { ASN1Element as _Element, ASN1TagClass as _TagClass, OPTIONAL, } from "asn1-ts"; import * as $ from "asn1-ts/dist/node/functional"; import { PKIStatusInfo, _decode_PKIStatusInfo, _encode_PKIStatusInfo, } from "../PKIXTSP/PKIStatusInfo.ta"; import { T...
import React, { useMemo } from 'react'; import { Box } from 'ink'; import { useDimensions } from '../../hooks'; import { msg } from '../../translate'; import { Style } from '../Style'; export type OverflowLabel = string | ((count: number) => string); export interface ScrollableItem { disabled?: boolean; divider?: b...
<reponame>fahrradflucht/alva<gh_stars>0 import { Directory } from '../directory'; import { Export } from '../typescript/export'; import { PatternFolder } from '../../../store/styleguide/folder'; import * as FileUtils from 'fs'; import * as PathUtils from 'path'; import { Pattern } from '../../../store/styleguide/patter...
import { Cohort, Child, Matches, Stories, Illustrations } from '../database/entity'; import { getRepository } from 'typeorm'; import { connection } from '../util/typeorm-connection'; import { sortByPoints } from '../routes/versus/versusRoutes.functions'; import { Versus } from '../database/entity/Versus'; async functi...
import React, { useState, useRef } from 'react' import styled, { css } from '@emotion/native' import { RNCamera, TakePictureResponse } from 'react-native-camera' import { SafeAreaView } from 'react-native-safe-area-context' import { useNavigation } from 'react-navigation-hooks' import RNFS from 'react-native-fs' impor...
<reponame>centrabot/centra<gh_stars>1-10 import { VoltareClient, CommandContext } from 'voltare' import { GeneralCommand } from '../../util/abstracts' import { Collection } from 'mongodb' import { stripIndents } from 'common-tags' import { format } from 'date-fns' import parse from 'yargs-parser' import { servers } fr...
<gh_stars>0 import { Action, Params } from "../action"; import { Filter } from "../filter"; import { Source } from "../source"; import { Resource, initialize } from "../resource"; import { Collection } from "../types"; import { Schema } from "../schema"; import * as query from "../query"; import { Document, Link, Embed...
import React, { useEffect, useState } from 'react'; import { useParams } from 'react-router-dom'; import API from '../../utils/request'; import Like from '../../components/Like'; import { GameInfo } from '../../types'; import { getPlatformTypes } from '../../utils'; import { useCollectGame } from '../../hooks'; const...
<filename>basic-data-types.ts // @ts-check /* Basic of Types Script */ let example1: boolean = true; console.log('hello'); // This returns an error because value is expected to be a boolean // let example2: boolean = 35; // You can add a pipe and mention return will be a boolean OR a number let example3: boolean | ...
<gh_stars>1-10 import { Component, ChangeDetectionStrategy, ViewChild, TemplateRef, OnInit } from '@angular/core'; import { Camera, CameraOptions } from '@ionic-native/camera/ngx'; import { startOfDay, endOfDay, subDays, addDays, endOfMonth, isSameDay, isSameMonth, addHours } from 'date-fns'; import { CalendarDateForm...
<filename>src/test/unit/requests/courtRequests.test.ts import sinon from 'sinon'; import {dataManagementApi} from '../../../main/resources/requests/utils/axiosConfig'; import {CourtRequests} from '../../../main/resources/requests/courtRequests'; import fs from 'fs'; import path from 'path'; const courtRequests = new C...
<gh_stars>100-1000 import { Component, OnInit, ViewChild } from '@angular/core'; import { MatDialog, MatDialogRef } from '@angular/material/dialog'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort } from '@angular/material/sort'; import { MatTableDataSource } from '@angular/material/table';...
<gh_stars>0 import { Field, foreach, st, cmm, IPlugin, HandleSheetParams, PluginBase, OutFilePath } from "export-table-lib"; import * as fs from "fs-extra" /** * 对话框配置规则 * - 要在button事件中opendialog, 才能做到正常下一页 */ /** * * @param cmdline0 * @returns */ function convCmdStyle(cmdline0: string) { let cmdline = cmd...
export class Item { public id: number public itemname: string; public price: string; public unitofmeasure: string public insert_DateTime: string; public update_DateTime: string; } export class CommanFields { public columnId: number; public columnName: string; public columnLabel...
<gh_stars>1-10 import { AbstractRefreshTokenService, RefreshToken, Scope, Token, } from "../deps.ts"; import { Client } from "../models/client.ts"; import { User } from "../models/user.ts"; import { ClientService } from "./client.ts"; import { UserService } from "./user.ts"; interface TokenInternal { accessT...
type TypeNames = "string" | "number" | "boolean" | "undefined" | "function" | "object"; type Types = string | number | boolean | undefined | Function | object | null; type TypeNameType<T extends TypeNames> = T extends "string" ? string : T extends "number" ? number : T extends "boolean" ? boolean : T extends "unde...
<filename>src/compiler/build/build-stats.ts import { byteSize, sortBy } from '@utils'; import type * as d from '../../declarations'; import { isOutputTargetStats } from '../output-targets/output-utils'; /** * Generates the Build Stats from the buildCtx. Writes any files to the file system. * @param config the projec...
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ import { get } from 'lodash/fp'; import { SIGNALS_ID } from '../../../../com...
import { extract, select, toHtml } from '@yankeeinlondon/happy-wrapper' import type { HTML, IElement } from '@yankeeinlondon/happy-wrapper' import { isVue2, transformer, wrap } from '../utils' import type { Pipeline, PipelineStage, ResolvedOptions, } from '../types' const elementHashToArray = (hash?: Record<stri...
import ApiClient, { ApiClientInitConfig } from './client' import { denormalize, normalize } from './jsonapi' import { QueryParamsRetrieve, QueryParamsList, generateQueryStringParams } from './query' import { ResourceTypeLock } from './api' import config from './config' import { InterceptorManager } from './interceptor...
/** * Languagenius is an slack bot that converts slang acronyms to their meaning. * Invoked as: * * `/slang ttyl nm` * * will return a description of what `ttyl` and `nm` means. It will report back unknown acronyms. */ import express = require("express"); import bodyParser = require('body-parser'); import Rust...
import React from 'react'; // import { Fragment } from 'react'; import { useState } from 'react'; import { keyframes } from '@stitches/react'; import { styled } from 'stitches.config'; import { SmallSpacer, MediumSpacer } from '@/components/space'; // import { DotFilledIcon, CheckIcon, ChevronRightIcon } from '@radix-u...
import { H256, U64, U64Value } from "codechain-primitives"; import { H160, PlatformAddress } from "codechain-primitives/lib"; import { AssetScheme } from "codechain-sdk/lib/core/classes"; import * as fs from "fs"; import { CreateAsset } from "./actions/CreateAsset"; import { ASSET_ACCOUNTS, ASSET_SCHEMES, ...
<filename>client/main.ts /** * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
<reponame>dandriushchenko/blankjs import { Palette } from './palette' export const PaletteNine: Palette = { type: 'values', id: 'nine', name: 'Nine', values: [ '#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#bcbd22', '#17becf' ] } export con...
/** * webOS TV */ import { execCmd, tryExecCmd } from '../../helpers/cli'; import { parseVersion } from '../../helpers'; const HD_CHIPSETS = ['A5LR', 'M2', 'M2R', 'M3', 'M3R']; const TV_INFO_KEYS = ['boardType', 'firmwareVersion', 'modelName', 'sdkVersion', 'UHD', '_3d']; // http://webostv.developer.lge.com/api/webo...
<reponame>swivelsoftware/node-jql<filename>script/concat-ts.ts import { createReadStream, mkdir, stat, writeFile } from 'fs' import _ from 'lodash' import minimist from 'minimist' import { dirname, resolve } from 'path' import { createInterface } from 'readline' function readFile(file: string): Promise<string[]> { r...