text
stringlengths
3.08k
15.5k
import { css, memoizeStyle, prefix } from '../../lib/theming/Emotion'; import { Theme } from '../../lib/theming/Theme'; import * as ColorFunctions from '../../lib/styles/ColorFunctions'; export const globalClasses = prefix('token')({ removeIcon: 'remove-icon', }); export const styles = memoizeStyle({ token(t: The...
<gh_stars>1-10 import {backendPrivateUrl, backendPublicUrl} from '../../lib' import axios from 'axios' import {readResources} from '../../../../shared/lib' const protectedUrl = `${backendPrivateUrl}upload/metadata/` const privateUrl = `${backendPrivateUrl}upload-metadata/` const privateModelUrl = `${backendPrivateUrl}...
<filename>src/components/kubectl/autoversion.ts import * as path from 'path'; import * as crypto from 'crypto'; import * as download from '../download/download'; import { Shell, shell } from "../../shell"; import { Dictionary } from '../../utils/dictionary'; import { fs } from '../../fs'; import { Kubectl, createOnBin...
<filename>tfjs-data/src/statistics.ts /** * @license * Copyright 2018 Google LLC. 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/...
import { useState, useEffect, useRef } from "react"; import * as firebase from "firebase/app"; import * as jwt from "jsonwebtoken"; import { v4 as uuidv4 } from "uuid"; import { IExperiment } from "../../shared/experiment-types"; import { Experiments } from "../../mobile-app/hooks/use-experiments"; import { inIframe } ...
const moment = require("moment"); import { Moment } from "moment"; import XLSX from "xlsx"; import { uniq } from "lodash"; import { config } from "config"; const { dateFormats, dateRegexes } = config.dateConfig; const { dateRegex, startDateRegex, endDateRegex } = dateRegexes; /** * Extract spatial and temporal exten...
import AminoClient from "aminoclient"; import * as fs from "fs"; import { Component } from "inferno"; import { style } from "typestyle"; const classFileDrop = style({ backgroundColor: "rgba(0, 0, 0, 0.5)", pointerEvents: "none", width: "100%", height: "100%", position: "absolute", opacity: 0, ...
import express, { Response, Request, Application } from 'express'; // Import express framework import { Server } from 'http'; import cookieParser from 'cookie-parser'; import cors from 'cors'; import corsOptions from './config/cors-options.config'; import db from './models'; import { InitDatabaseOptions, AddSuperAdminU...
/** * @file Article state * @module store.article * @author Surmon <https://github.com/surmon-china> */ import { defineStore } from 'pinia' import { isClient } from '/@/app/environment' import { LONG_ARTICLE_THRESHOLD } from '/@/config/app.config' import { SortType, OriginState, UniversalExtend } from '/@/constant...
<gh_stars>0 import createError from 'http-errors'; import { decode, encode } from 'base64-arraybuffer'; import { IncomingMessage, ServerResponse } from 'http'; import dbg from 'debug'; import { sspi, AcceptSecurityContextInput, CtxtHandle } from '../../lib/api'; import { hexDump, getMessageType } from './misc'; import...
<gh_stars>0 import type { CSSEntries, CSSObject, DynamicMatcher, ParsedColorValue, RuleContext } from '@unocss/core' import type { Theme } from '../theme' import { hex2rgba } from './colors' import { handler as h } from './handlers' import { directionMap } from './mappings' /** * Provide {@link DynamicMatcher} functi...
<reponame>windranger-io/governance // Start - Support direct Mocha run & debug import 'hardhat' import '@nomiclabs/hardhat-ethers' // End - Support direct Mocha run & debug import chai, {expect} from 'chai' import chaiAsPromised from 'chai-as-promised' import {ethers, upgrades} from 'hardhat' import {before} from 'moc...
import { IGQLType, IGQLField, GQLScalarField } from "./model" import { parse } from "graphql" const isUniqueDirectiveKey = 'unique' const defaultValueDirectiveKey = 'default' const relationDirectiveKey = 'relation' /** * Parses a datamodel given as DSL * to an internal representation, convenient for * working wit...
import * as React from 'react'; import Paper from '@material-ui/core/Paper'; import Typography from '@material-ui/core/Typography'; import Grid from '@material-ui/core/Grid'; import Button from '@material-ui/core/Button'; import FormControl from '@material-ui/core/FormControl'; import Input from '@material-ui/core/Inpu...
import { ColorUtils as Color, Coordinates, DOMUtils as DOM, IS_TOUCH, HSV, } from '../../../utils'; const html = /* html */ ` <div class="color-picker__container"> <div class="color-picker__saturation"> <div class="color-picker__saturation-box"></div> <div class="color-picker__saturation-ha...
import * as React from 'react'; import { Collapse } from 'react-bootstrap'; import { Expandable } from '@patternfly/react-core'; import { MessageType, NotificationMessage, NotificationGroup } from '../../types/MessageCenter'; import moment from 'moment'; import { BoundingClientAwareComponent, PropertyType } from '....
import React, { useContext, useEffect, useMemo } from 'react'; import { connect } from 'react-redux'; import { EyeOutlined, ShoppingCartOutlined } from '@ant-design/icons'; import { Card, Checkbox, Col, Empty, Layout, Pagination, Row, Spin, Tabs } from 'antd'; import styled from 'styled-components'; import { RootState...
/** * @category 3d/primitive */ import { Vec3 } from '../math'; /** * @zh * 胶囊体参数选项。 */ export interface ICapsuteOptions { sides: number; heightSegments: number; capped: boolean; arc: number; } const temp1 = new Vec3(0, 0, 0); const temp2 = new Vec3(0, 0, 0); /** * @zh * 生成一个胶囊体。 * @param ra...
<filename>test/nodefs.test.ts /** * trzsz: https://github.com/trzsz/trzsz.js * Copyright(c) 2022 <NAME> <<EMAIL>> * @license MIT */ const os = require("os"); const fs = require("fs"); const path = require("path"); import { strToUint8 } from "../src/comm"; import { checkFilesReadable, checkPathWritable, openSendFil...
import React from "react" import Layout from "../components/Layout" import Header from "../components/global/header" import SEO from "../components/seo" import { graphql } from "gatsby" import Mailing from "../components/global/mailing" import Banner from "../components/global/banner" import Books from "../components/c...
import React, { useEffect, useState } from "react"; import CustomModal from "components/Modal"; import { isMobile, Modal, TextDesc, Title } from "styles/styles"; import { FormattedMessage } from "react-intl"; import WalletIcon from "images/wallet/wallet.svg"; import Button from "components/Button"; import styled, { css...
<reponame>tkurki/r-board import { AppEvent, Board, BoardHistoryEntry, BoardWithHistory, EventFromServer, EventUserInfo, Id, isPersistableBoardItemEvent, Item } from "./domain"; import _, { max } from "lodash" import { foldActions } from "./action-folding"; export function boardHistoryReducer(board: BoardWithHistory, a...
import { reduceByKey } from '../object' import { AllType } from './AllType' import { Array as ArrayType } from './Array' import { Boolean } from './Boolean' import { number, Number } from './Number' import { object, ObjectType } from './Object' import { Record as RecordType } from './Record' import { string, String } f...
<reponame>secretshardul/flipper /** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format */ import {SandyPluginDefinition} from './SandyPluginDefinition'; import {EventEmitter}...
import * as React from 'react'; import styled from '@emotion/styled'; import { css } from '@emotion/react'; import { useGetAllTags } from '@/rendererApi/tags'; import { UseQueryOptions } from 'react-query'; import { Badge, Empty, Popover, Select } from 'antd'; import { COLOR_PALETTE } from 'src/const/theme/color'; imp...
import findIndex from 'lodash-es/findIndex'; import sortBy from 'lodash-es/sortBy'; import * as React from 'react'; import {KeyValWithType} from './util'; export interface Column<T> { label: React.ReactNode; key: keyof T; getData?(row: T): string; getSortValue?(row: T): string | number; renderData...
import React, { useContext, useMemo } from 'react' import styled, { ThemeContext } from 'styled-components' import { Pair, JSBI } from '@uniswap/sdk' import { SwapPoolTabs } from '../../components/NavigationTabs' import FullPositionCard from '../../components/PositionCard' import { useUserHasLiquidityInAllTokens } fro...
/** @jsx jsx */ import * as React from 'react' import { useState, useEffect } from 'react' import { jsx, css } from '@emotion/core' import { Container} from './Container' import { hsvToRgbHex } from '../utils' import { RandGen, newRandGen, randNext, randRange } from 'fn-mt' type Rect = { x: number y: number w: n...
import React, { FC, useCallback, useMemo, useRef, useState } from 'react' import { useDeepCompareMemo } from './hooks/useDeepCompareMemo' import { ChevronLeft, ChevronRight, Settings, ArrowLeft } from 'react-feather' import cn from 'classnames' import { usePagination } from './hooks/usePagination' import { Button } fr...
<gh_stars>1-10 import type { AppInterface, sourceType, SandBoxInterface, sourceLinkInfo, sourceScriptInfo, Func, } from '@micro-app/types' import extractHtml from './source' import { execScripts } from './source/scripts' import { formatHTMLStyleAfterUmdInit } from './source/links' import { appStatus, lifeCy...
import { ArrayElement, JovoLoggerConfig } from '@jovotech/common'; import _merge from 'lodash.merge'; import { ComponentTree, I18NextConfig, IntentMap, Jovo, Logger, Middleware, MiddlewareFunction, Plugin, PossibleMiddlewareName, } from '.'; import { ComponentConstructor, ComponentDeclaration } from '...
<filename>src/libs/planner.ts import { Db, ObjectID } from 'mongodb'; import { InputError, InternalError } from './errors'; import { Omit } from './utils'; import { PlannerEvent } from '@mymicds/sdk'; import * as classes from './classes'; import * as htmlParser from './htmlParser'; import * as users from './users'; /*...
import { css } from '@emotion/react'; import { headline, neutral, textSans } from '@guardian/source-foundations'; import Camera from '../../static/icons/camera.svg'; import Clock from '../../static/icons/clock.svg'; import Quote from '../../static/icons/quote.svg'; import VideoIcon from '../../static/icons/video-icon.s...
/* eslint jsx-a11y/anchor-is-valid: 0 */ import React, { Component } from 'react'; import { Button, Collapse, Row, Col, DropdownToggle, DropdownMenu, DropdownItem, Header, Headers, HeaderContent, HeaderSearch, HeaderRightZone, HeaderSocialsZone, HeaderToggler, HeaderLinkZone, Icon, Li...
<reponame>Cricle/hitokoto-web<gh_stars>0 import { defineConfig } from 'vite' import { resolve } from 'path' // Obfuscator // 与 Vite-ssg 冲突,需要修复 // import obfuscator from 'rollup-plugin-obfuscator' // import { ObfuscatorOptions } from 'javascript-obfuscator' // Vite plugins import Vue from '@vitejs/plugin-vue' import ...
<filename>src/models/Viewer.ts import { types } from 'typed-graphqlify' import { RoomKeys, RoomOption, buildRoomsQuery, RoomsResult } from './Rooms' import { RoomMemberKeys } from './RoomMembers' import { OrganizationKeys } from './Organizations' import { pick } from '../Utils' import { ViewerRoomsArgs, OrganizationMem...
<filename>src/front/base/scene.ts<gh_stars>0 // tslint:disable-next-line:no-reference /** * scene */ import { BABYLONLoading } from './babylondownload'; import { SceneInstance3D } from './scene_struct'; import { SceneRenderFlags } from './base'; import { FactoryEngine } from './base_factory'; // tslint:disa...
import { isInRange } from '../../common/helpers/math' import { Point2D, Arc, CircularSector } from '../../common/types/geometry' import { colorClassMap } from '../../common/helpers/color' import { Color } from '../../common/types/color' import { fitText } from '../../common/helpers/textWrap' import { TextSizeMeasurer }...
import xs from "xstream"; import { Stream } from "xstream"; import { Reducer } from "@cycle/state"; import { GoalID, Status, Result } from "./types"; import { initGoal, isEqualGoalID, generateGoalID } from "./utils"; // FSM types export enum S { PEND = "PEND", RUN = "RUN" } export enum SIGType { GOAL = "GOAL", ...
import Context from "./context.js"; import { validate as validateCrls } from './crl.js'; import { ErrorCode } from "./error.js"; import { validate as validateIssuer } from './issuer.js'; import key from "./key.js"; import { parse } from "./rid.js"; import { CRL, Issuer, IssuerInfo, JWK } from "./types.js"; import { iso...
import Loading from '@components/elements/Loading'; import { Layout } from '@components/layouts'; import { Post } from '@components/modules/post'; import { useInterestingPlacesQuery } from '@graphql/queries/place.graphql'; import { usePersonalizedPostsQuery } from '@graphql/queries/post.graphql'; import { useMeQuery,...
<filename>packages/worker/src/workflow/bundler.ts import path from 'path'; import util from 'util'; import dedent from 'dedent'; import webpack from 'webpack'; import { v4 as uuid4 } from 'uuid'; import * as realFS from 'fs'; import * as memfs from 'memfs'; import * as unionfs from 'unionfs'; import { DefaultLogger, Lo...
<reponame>herrardo/x<gh_stars>0 import { Facet } from '@empathyco/x-types'; import { DeepPartial } from '@empathyco/x-utils'; import { createLocalVue, mount, Wrapper } from '@vue/test-utils'; import Vue from 'vue'; import Vuex, { Store } from 'vuex'; import { createHierarchicalFacetStub, createSimpleFacetStub } fro...
import React from 'react'; import { ApiHelper, InputBox, DonationInterface, FundDonationInterface, PersonAdd, FundInterface, FundDonations, Helper, PersonInterface } from './'; interface Props { donationId: number, batchId: number, funds: FundInterface[], updatedFunction: () => void } export const DonationEdit: Reac...
<gh_stars>1-10 /** * @author <NAME> * @copyright 2020 <NAME> * @license Apache-2.0 * * 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...
import * as React from 'react'; import * as ol from 'openlayers'; import * as types from './types'; export function isNull(x) { return typeof x === 'undefined' || x === null } export function isEmpty(x) { return typeof x === 'undefined' || x === null || x === '' || (Array.isArr...
<gh_stars>1-10 import sengEvent from 'seng-event'; import ScrollTrackerPoint from './ScrollTrackerPoint'; import Axis from './enum/Axis'; import ScrollTrackerEvent from './event/ScrollTrackerEvent'; import Side from './enum/Side'; const throttle = require('lodash/throttle'); const size = require('element-size'); /** ...
import * as React from 'react' import * as faceapi from 'face-api.js'; import { Dialog, Paragraph, Heading } from 'evergreen-ui' const adultjs_styles = { backgroundColor: "white", width: "100vw", height: "100vh", zIndex: 999999, } interface MirrorProps { handle_video_element: (video_element: HTMLVideoElemen...
import React, { useCallback, useEffect, useState } from 'react'; import { CustomBackground, Header, PasswordStrengthMeter, CustomTooltip, Footer, CustomSmallDivider, } from 'components'; import { useForm } from 'react-hook-form'; import * as yup from 'yup'; import { yupResolver } from '@hookform/resolvers/y...
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *---------------------------------------------------------------...
import Renderer from '../Renderer'; import Block from '../Block'; import Node from '../../nodes/shared/Node'; import Wrapper from './shared/Wrapper'; import deindent from '../../../utils/deindent'; const associatedEvents = { innerWidth: 'resize', innerHeight: 'resize', outerWidth: 'resize', outerHeight: 'resize', ...
import { Token, Keyword, Length, Percentage, String, Number, } from "@siteimprove/alfa-css"; import { Parser } from "@siteimprove/alfa-parser"; import { Property } from "../property"; import { Resolver } from "../resolver"; const { map, either, option, delimited, separatedList } = Parser; export namespac...
import { addFormats, format, formatObject, FormatOptions, formats, plural, Plural, select, selectObject, setFormats } from '.'; import { languageTag } from './LanguageTag'; import IntlPolyfill = require('intl'); import areIntlLocalesSupported = require('intl-locales-supported'); ...
<filename>katharsis-ui/src/app/browse/browse.service.ts import * as _ from 'lodash'; import {Component, Injectable} from "@angular/core"; import {TreeNode} from 'primeng/primeng'; import {Http, Response, RequestOptions, Headers} from "@angular/http"; import {LocalStorageService} from 'angular-2-local-storage'; @...
import React, { useState } from 'react'; import { useMutation, useQuery, useQueryClient, UseMutationResult } from 'react-query'; import { sendRequest, HttpError } from '../../http/fetch'; import { Loader } from '../Loader'; import { Alert } from '../Alert'; import { ToggleAlert } from '../ToggleAlert'; import { EmailFo...
import { autorun, makeAutoObservable, runInAction } from 'mobx'; import { IS_DEV, IS_TEST, USE_SAMPLE_DATA } from 'config'; import { createBrowserHistory, History } from 'history'; import AppStorage from 'util/appStorage'; import CsvExporter from 'util/csv'; import { actionLog, Logger } from 'util/log'; import { GrpcCl...
<filename>packages/internal/src/generate/typeDefinitions.ts import fs from 'fs' import path from 'path' import { generate } from '@graphql-codegen/cli' import { findCells, findDirectoryNamedModules } from 'src/files' import { getJsxElements } from 'src/jsx' import { getPaths, processPagesDir } from 'src/paths' impor...
import {useState} from 'react' import {Menu as MenuIcon, X as XIcon} from 'lucide-react' import { Container, Flex, VStack, HStack, Heading, Box, Text, IconButton, useColorModeValue as mode, } from '@chakra-ui/react' import {Link} from 'components/link' import {ColorModeSwitcher} from 'features/prefere...
<reponame>karlgodtliebsen/designsystem import { Component, ContentChild, EventEmitter, HostBinding, Input, OnInit, OnChanges, Output, TemplateRef, ViewChild, TrackByFunction, ContentChildren, AfterViewInit, Inject, } from '@angular/core'; import { ListFlexItemDirective, ListFooterDirect...
import { IconCalendar, IconDownload, IconMenuHamburger, Notification, } from "hds-react"; import React, { useState } from "react"; import { useTranslation, TFunction } from "react-i18next"; import dynamic from "next/dynamic"; import styled from "styled-components"; import { useRouter } from "next/router"; impor...
<gh_stars>0 import { Seq } from "lazily-async"; import exception from "./exception.js"; import { EvaluationStack, BashoLogFn, ExpressionStackEntry, BashoEvaluationResult, EvaluationEnv, } from "./types.js"; import { PipelineValue, PipelineItem } from "./pipeline.js"; import jsExpression from "./operators/jsEx...
/** @jsx jsx */ import { jsx } from "@emotion/core"; import { Button, IColumn, InputField, ITableDataItem, Table } from "@magnit/components"; import { AddIcon } from "@magnit/icons"; import { getFriendlyDate } from "@magnit/services"; import { Grid, MenuItem, Paper, Typography } from "@material-ui/core"; import { Link...
<reponame>funnisimo/gw-core<gh_stars>0 // import { Color } from '../color'; // import * as Utils from './utils'; import { eachWord } from './each'; import * as UTILS from '../utils'; export interface WrapOptions { hyphenate?: number | boolean; indent?: number; } export function wordWrap( text: string, ...
<reponame>rage-trade/perpswap-contracts import { expect } from 'chai'; import { BigNumber, ethers } from 'ethers'; import hre from 'hardhat'; import { formatUnits, parseEther, parseUnits } from '@ethersproject/units'; import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; import { Q128 } from '@ragetra...
import { Clue } from "./Clue"; import { words2 } from "./words/w02"; import { words3 } from "./words/w03"; import { words4 } from "./words/w04"; import { words5 } from "./words/w05"; import { words6 } from "./words/w06"; import { words7 } from "./words/w07"; import { words8 } from "./words/w08"; import { words9 } from ...
import Feature, { FeatureLike } from 'ol/Feature'; import Map from 'ol/Map'; import View from 'ol/View'; import { Coordinate } from 'ol/coordinate'; import IGC from 'ol/format/IGC'; import { LineString, Point } from 'ol/geom'; import SimpleGeometry from 'ol/geom/SimpleGeometry'; import { Tile as TileLayer, Vector as Ve...
// Dependencies import chalk from 'chalk'; import { spawn } from 'child_process'; import fs from 'fs'; import path from 'path'; import semver from 'semver'; import deepmerge from 'deepmerge'; import defaultSettings from './default-settings'; import ErrorWithoutStack from './error-without-stack'; import screens from './...
import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import { render } from '@ember/test-helpers'; import { click, fillIn, findAll, triggerEvent } from '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; import { TestContext as Context } from 'ember-test-helpers'; //@...
/* This file is part of CNCLib - A library for stepper motors. Copyright (c) <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 without limitation the r...
/** * @file Structure Representation * @author <NAME> <<EMAIL>> * @private */ import { RepresentationParameters, default as Representation } from './representation'; import Selection from '../selection/selection'; import { RadiusType } from '../utils/radius-factory'; import Structure from '../structure/structure'; ...
<reponame>Omhet/stryker import { StrykerOptions, INSTRUMENTER_CONSTANTS, Mutant } from '@stryker-mutator/api/core'; import { Logger } from '@stryker-mutator/api/logging'; import { commonTokens, Injector, PluginContext, tokens } from '@stryker-mutator/api/plugin'; import { TestRunner2, MutantRunOptions, DryRunResu...
<gh_stars>0 import {Component, Inject, OnDestroy, OnInit, ViewChild} from '@angular/core' import {NgForm} from '@angular/forms' import {MatDatepickerInputEvent} from '@angular/material/datepicker' import {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from '@angular/material/dialog' import {MatSelect} from '@angular/materia...
import {useState, useCallback, useEffect, useRef} from 'react'; import produce from 'immer'; export type Props<T> = { list: readonly NonPrimitive<T>[]; getKey: ItemKeyFn<T>; children: ItemRenderFn<T>; }; type NonPrimitive<T> = T extends boolean | number | string | null | undefined ? never : T; export...
<reponame>Leoxyzua/yuyu import { GatewayClientEvents, Interaction, Utils } from "detritus-client" import { MessageFlags, InteractionCallbackTypes, MessageComponentButtonStyles } from "detritus-client/lib/constants" import { Message } from "detritus-client/lib/structures" import logger from "../logger" impor...
/* * The MIT License (MIT) * * Copyright (c) 2015 - present Instructure, Inc. * * 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 without limitation the ri...
import EventEmitter from 'eventemitter3'; import logDefinitions from '../../resources/netlog_defs'; import { addOverlayListener } from '../../resources/overlay_plugin_api'; import ZoneInfo from '../../resources/zone_info'; import { EventResponses as OverlayEventResponses, Party } from '../../types/event'; import...
import React, { FC, useCallback } from 'react'; import { get, isEqual } from 'lodash'; import { Checkbox } from 'react-elegant-ui/esm/components/Checkbox/Checkbox.bundle/desktop'; import { Button } from '../../../../components/Button/Button.bundle/desktop'; import { Select } from '../../../../components/Select/Select...
<reponame>MindXL/koishi import { Tables, TableType, Query, App, Database, User, Channel } from 'koishi-core' import { clone, pick } from 'koishi-utils' declare module 'koishi-core' { interface Database { memory: MemoryDatabase initUser(id: string, authority?: number): Promise<void> initChannel(id: string...
<reponame>stellakeppo/pheweb<filename>pheweb/serve/react/js/common/Model.tsx<gh_stars>1-10 /* eslint camelcase: 0 */ /* eslint no-unused-vars: ["error", { "varsIgnorePattern": "ignore" }] */ // https:// stackoverflow.com/questions/59833839/swap-one-typescript-type-with-another-inside-an-object export interface Casual...
import LightStorage from '../src'; import { delay } from './utils'; describe('create', () => { const defaultPrefix = 'light-storage'; const storage = new LightStorage(); test('created instance', () => { expect(storage).toStrictEqual(expect.any(LightStorage)); expect(storage.prefix).toBe(defaultPrefix); ...
import React, {useCallback, useState, useEffect} from 'react'; import {captureException} from '@sentry/react'; import styled from 'styled-components'; import {toast} from 'react-toastify'; import {useSelector} from 'react-redux'; import {RootState, useDispatch} from '../../store'; import { getSignUpRequests, approveS...
<gh_stars>1-10 import { addParticleAnimations } from 'app/content/animationEffect'; import { removeObjectFromArea } from 'app/content/areas'; import { FRAME_LENGTH } from 'app/gameConstants'; import { createAnimation, drawFrame, getFrame } from 'app/utils/animations'; import { directionMap, isPointOpen } from 'app/util...
<gh_stars>0 /* * Most basic/simple implementation of a Typescript Promise! * Documentation and implementation based off of: * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise * * Recreating wheels! */ import {EventDispatcher} from "simple-ts-event-dispatcher"; export inte...
import React, { useState } from "react" import ExpandMoreIcon from "@material-ui/icons/ExpandMore" import MuiAccordion from "@material-ui/core/Accordion" import MuiAccordionSummary from "@material-ui/core/AccordionSummary" import MuiAccordionDetails from "@material-ui/core/AccordionDetails" import { Typography, Lis...
// tslint:disable: no-conditional-assignment no-namespace import * as fs from 'fs'; import { spawn, ChildProcessWithoutNullStreams } from 'child_process'; import { Readable, Writable } from 'stream'; import { PromiseCompletionSource, ObjectDisposedError, InvalidOperationError, IDisposable, } from '@fo...
<gh_stars>0 import { ConfigServiceService } from './../../../service/config-service.service'; import { Component, OnInit } from '@angular/core'; import { Http, Response, Headers } from '@angular/http'; import { HttpClient, HttpEvent, HttpEventType } from '@angular/common/http'; import { StorageSessionService } from './...
<filename>packages/engine/src/renderer/materials/constants/Fireball.mat.ts<gh_stars>1-10 import { ShaderMaterial, Texture } from 'three' import { AssetLoader } from '@xrengine/engine/src/assets/classes/AssetLoader' import { DudTexture, MaterialParms } from '../MaterialParms' export const vertexShader = ` varying vec...
import * as _ from 'lodash'; import * as url from 'url'; import { stripIndent } from 'common-tags'; import { ClientServerChannel, Serializable, SerializedProxyConfig, serializeProxyConfig } from "../../serialization/serialization"; import { Explainable, Headers } from "../../types"; import { Clos...
import { never } from '@most/core'; import { Component } from '../../core/component'; import { Stream } from '../../core/stream'; import { throwError } from '../../utils/error-handling'; import { noop } from '../../utils/misc'; import View from './webcam.view.svelte'; function requestInterval(fn: () => void, delay: nu...
import { StandardProps } from ".."; import { MenuProps, Menu } from "../Menu/Menu"; import warning from "warning"; import classNames from "classnames"; import { ArrowDropDown } from "../internal/svg-icons/ArrowDropDown"; import { isFilled } from "../Input/Input"; export interface SelectInputProps extends StandardPro...
import { IAmACommand } from "../framework/interfaces/iamacommand"; import { LearnableEvent } from "../objects/learnableevent"; import { LearnableSequence } from "../objects/learnablesequence"; import { IAmAControlModule } from "../framework/interfaces/iamacontrolmodule"; import { IAmARobotEvent } from "../framework/int...
<gh_stars>1-10 import { User, Message, CommandInteraction, MessageEmbed } from "discord.js"; import { getRepository } from "typeorm"; import { Discod } from "../entity/Discod"; import { Clients } from "../entity/Clients"; import { Aliases } from "../entity/Aliases"; export type CommandArgument = { ctx: Message |...
import {GitSimulator} from "./classLibrary/GitSimulator"; import chalk from "chalk"; import {CyanSafe, IAutoInquire} from "./classLibrary/TargetUtil/CyanResponse"; import * as path from "path"; import {ExecuteCommandSimple, GenerateTemplate, Interrogate} from "./generator"; import {FakeInquirer} from "./classLibrary/Pe...
import { makeDbMock, makeProvider } from "../../libs"; import { UserSyncableDB } from '@augurproject/sdk/build/state/db/UserSyncableDB'; import { stringTo32ByteHex } from '@augurproject/core/build/libraries/HelperFunctions'; import { BigNumber } from 'bignumber.js'; import { formatBytes32String } from 'ethers/utils'; i...
/** * 📽 Projection module for converting between Lon/Lat (λ,φ) and Cartesian (x,y) coordinates * @module * @description * The default projection wraps a [d3.geoMercatorRaw](https://github.com/d3/d3-geo#geoMercatorRaw) projection * but works in degrees instead of radians, and skips several features: * Antimeridia...
<gh_stars>1-10 import { NuxtConfig } from '@nuxt/types'; import { Configuration as WebpackConfiguration, ExternalsFunctionCallback, ExternalsFunctionElement } from 'webpack'; const nuxtConfig: NuxtConfig = { /** * @docs https://nuxtjs.org/api/configuration-generate */ generate: { cache: { ignore: [...
<reponame>artemv01/ngx-admin import { AfterViewInit, Component, OnDestroy, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { ChartConfiguration, ChartDataSets, ChartOptions } from 'chart.js'; import { Label, Color, ThemeService as ChartTheme } from 'ng2-charts'; import { Report }...
<filename>src/index.ts import { KeySignatures, KeySignature, guessKeySignature, } from "./KeySignatures"; import { Chord, isChord, CHORD_RANKS } from "./Chord"; export type Token = Chord | string; const N_KEYS = 12; /** Fluent API for transposing text containing chords. */ export class Transposer {...
import { expect } from "chai" import { Connection } from "../src/types" import { Rabbit } from "../src" type ConnectionOpts = { protocol?: string hostname?: string port?: number|string username?: string password?: string locale?: string frameMax?: number|string channelMax?: number|string heartbeat?: ...
import { Kind, ASTNode, NameNode, VariableNode, NamedTypeNode, SelectionSetNode, OperationTypeNode, FragmentSpreadNode, DocumentNode, VariableDefinitionNode, ExecutionResult, GraphQLSchema, GraphQLObjectType, GraphQLResolveInfo, GraphQLError, isAbstractType, getNamedType, TypeInf...