text
stringlengths
10
953k
export const RATE_LIMIT_THRESHOLDS_PER_MINUTE = { COINGECKO: 500, // https://www.coingecko.com/en/api/documentation - analyst plan COINCAP: 200, // https://docs.coincap.io/ limits->free tier DEFAULT: 300 // default for services } export const DEFAULT_RATE_LIMITER_INTERVAL_IN_MS = 60000
/** * @file IconRepair 编辑 * @author Auto Generated by IconPark */ /* tslint:disable: max-line-length */ /* eslint-disable max-len */ import {ISvgIconProps, IconHelper, IconWrapper} from '../runtime'; export default IconWrapper( 'IconRepair', true, (h: IconHelper, props: ISvgIconProps) => ( <svg...
import React from "react" import { createStyles, makeStyles } from "@material-ui/core/styles" import { Link, graphql, useStaticQuery } from "gatsby" import Button from "@material-ui/core/Button" import Img from "gatsby-image" const useStyles = makeStyles(theme => createStyles({ root: { overflow: "hidden", ...
import { $, NodeInterface, InlinePlugin, isEngine, PluginEntry, PluginOptions, } from '@aomao/engine'; import Toolbar from './toolbar'; import locales from './locales'; import './index.css'; export interface LinkOptions extends PluginOptions { hotkey?: string | Array<string>; markdown?: string; onConfirm?: (...
import { makeStyles } from 'utils/styles'; export const useStyles = makeStyles( theme => ({ root: { margin: '0 auto', maxWidth: theme.breakpoints.values.desktopXL, position: 'relative', display: 'flex', flexDirection: 'column', minHeight: '100%', }, container: { ...
import { useCallback } from 'react' import { useAuthorization } from 'features/authorization' export const useLogout = () => { const { setIsAuthorized } = useAuthorization() const handleLogout = useCallback(() => { setIsAuthorized(false) localStorage.clear() }, [setIsAuthorized]) return { handleLogou...
/** * Copyright (c) Microsoft Corporation * All rights reserved. * * MIT License * * 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 * th...
import * as glMatrix from "./common"; import { IndexedCollection } from "./imports"; import { Maths } from "./maths"; import { ReadonlyMat2 } from "./mat2"; import { ReadonlyMat4 } from "./mat4"; import { ReadonlyVec2 } from "./vec2"; export type ReadonlyQuat = IndexedCollection; export type mat3 = IndexedCollection;...
import { Contracts } from "@arkecosystem/platform-sdk-profiles"; import { renderHook } from "@testing-library/react-hooks"; import React from "react"; import { act } from "react-test-renderer"; import { env, getDefaultProfileId, waitFor } from "utils/testing-library"; import { ConfigurationProvider } from "../../../ap...
/* * 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 { FtrConfigProviderContext } from '@kbn/test/types/ftr'; import { page...
export { ExtendedSignUpForm } from './ExtendedSignUpForm';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { NgModule } from '@angular/core'; import { FormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms'; import { HttpClientModule } from '@angular/common/http'; import { MatSnackBarModule } from '@angular/material'; import...
import { Directive, ViewContainerRef } from '@angular/core'; @Directive({ selector: '[workspace-host]' }) export class WorkspaceHostDirective { constructor(public viewContainerRef: ViewContainerRef) { } }
export * from './base'; export { AvlMap } from './map'; export { AvlSet } from './set';
<TS language="vi" version="2.1"> <context> <name>AddressBookPage</name> <message> <source>Right-click to edit address or label</source> <translation>Ấn chuột phải để sửa địa chỉ hoặc tên</translation> </message> <message> <source>Create a new address</source> <translation...
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
import { computed } from "mobx" import { Frozen, Model, model, prop } from "../../dist" // tiny @model("Treasure") export class Treasure extends Model({ trapped: prop<boolean>(), gold: prop(() => 0), }) {} // medium export const HeroRoles = ["warrior", "wizard", "cleric", "thief"] as const export type HeroRolesTy...
import React from 'react'; import { observable, autorun } from 'mobx'; import useBooleanSwitch from './hooks/useBooleanSwitch'; import { observer } from 'mobx-react-lite'; import CheckBoxOutlineBlankOutlinedIcon from '@material-ui/icons/CheckBoxOutlineBlankOutlined'; import CheckBoxOutlinedIcon from '@material-ui/icons...
import { ManagedClasses } from "@microsoft/fast-components-class-name-contracts-base"; import { Direction } from "@microsoft/fast-web-utilities"; import { DataDictionary, LinkedData } from "@microsoft/fast-tooling"; import { StandardLuminance } from "@microsoft/fast-components-styles-msft"; import { CreatorClassNameCon...
/** Sección tabla */ export const COLUMNAS = [ { text: "Cargo", value: "rol" }, { text: "Nombres", value: "nombres" }, { text: "Apellidos", value: "apellidos" }, { text: "Documento", value: "documento" }, { text: "Celular", value: "celular" }, { text: "Email", value: "email" }, { text: "Acciones", value...
import chroma from 'chroma-js'; import Colors from './Colors'; export default class Palette { name: string; scale: string; colors: Array<Object>; captions: boolean; preset: string; children: any; node: FrameNode; constructor(scale, captions, preset) { this.name = `UI Color Palette﹒${preset.name}`...
import { IsString, IsNotEmpty, IsUrl, IsOptional, Length } from 'class-validator'; export class UpdateUserDto { /** * Este campo é opcional, você pode criar agora ou depois fazendo um update. * Caso decida passar a informação agora, não passe como fazio, este campo necessita * de no mínimo 2 carac...
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { ResolutionsComponent } from './resolutions.component'; describe('ResolutionsComponent', () => { let component: ResolutionsComponent; let fixture: ComponentFixture<ResolutionsComponent>; beforeEach(async(() => { TestBed.confi...
import path from 'path'; import { GeneratorContext, GeneratorCore } from '@modern-js/codesmith'; import { AppAPI } from '@modern-js/codesmith-api-app'; import { JsonAPI } from '@modern-js/codesmith-api-json'; import { FsAPI } from '@modern-js/codesmith-api-fs'; import { fs, isTsProject, getPackageManager, getPa...
// /* eslint-disable prettier/prettier */ // import { Injectable } from '@nestjs/common'; // import { InjectRepository } from '@nestjs/typeorm'; // import { Repository } from 'typeorm'; // import { addUserDto } from './dto/add-user.dto'; // import { User } from './entities/user.entity'; // @Injectable() // export clas...
import * as React from "react"; import { IIconProps } from "../styled"; const SvgVirtualRealityColor10 = (props: IIconProps) => ( <svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 3" viewBox="0 0 128 128" width="1em" height="1em" {...props} > <path fill="#c5f3ff" d="M...
/** * 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. */ import {Scope, ThisScope} from "../../scopes"; import {AnyNode, jsThisExpression} from "@romejs/ast"; import OpenT from "../../typ...
// @ts-nocheck import rgba from "hex-to-rgba"; import React, { useEffect, useRef } from 'react'; import { StyleSheet, TouchableOpacity } from 'react-native'; import { Badge, Div } from 'react-native-magnus'; import MapView, { Camera, Marker } from 'react-native-maps'; import * as Icon from "react-native-vector-icons";...
import { IAMClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IAMClient"; import { CreateUserRequest, CreateUserResponse } from "../models/index"; import { deserializeAws_queryCreateUserCommand, serializeAws_queryCreateUserCommand } from "../protocols/Aws_query"; import { getSerdePlugin } from "@aw...
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. // Copyright (c) 2019 Denolibs authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associate...
import { IWeatherPageState } from './weather/weather-page.state'; import { IForecastPageState } from './forecast/forecast-page.state'; import { ActionReducerMap } from '@ngrx/store'; import { forecastPageReducer } from './forecast/forecast.reducer'; import { weatherPageReducer } from './weather/weather.reducer'; import...
import { Component } from '@angular/core'; @Component({ moduleId: module.id, selector: 'ees-partners', templateUrl: 'partners.component.html', styleUrls: ['partners.component.css'], }) export class PartnersComponent {}
import React, { Component } from 'react'; import { View, Image } from 'react-native'; import { Constants } from '../Constants'; interface Interface { position: { x: number, y: number }, deg: number } export default class Projectile extends Component<Interface>{ props: any;...
import { URL } from 'url' import { Marpit } from '@marp-team/marpit' import { warn } from '../cli' export const keywordsAsArray = (keywords: unknown): string[] | undefined => { let kws: any[] | undefined if (Array.isArray(keywords)) { kws = keywords } else if (typeof keywords === 'string') { kws = keywo...
import { render } from '@testing-library/react'; import React from 'react'; import UserSettingsSection from './index'; jest.mock('../../../common/SectionPanel', () => (props: any) => <div>{props.defaultSection}</div>); const defaultProps = { activeSection: 'user', onAuthError: jest.fn(), }; describe('UserSettin...
import { LOCAL_SHOULD_LOG } from '@glimmer/local-debug-flags'; import { ASTv2, Source } from '@glimmer/syntax'; import { LOCAL_LOGGER } from '@glimmer/util'; import { Result } from '../../shared/result'; import * as mir from '../2-encoding/mir'; import { NormalizationState } from './context'; import { VISIT_STMTS } fr...
#!/usr/bin/env -S node --no-warnings --loader ts-node/esm /** * Wechaty Chatbot SDK - https://github.com/wechaty/wechaty * * @copyright 2016 Huan LI (李卓桓) <https://github.com/huan>, and * Wechaty Contributors <https://github.com/wechaty>. * * Licensed under the Apache License, Version 2.0 ...
import { useRecoilQuery } from 'hooks/recoil' import React from 'react' import { Redirect, Route, RouteProps } from 'react-router-dom' import { userInfoGetters } from 'stores/user' interface Props extends RouteProps { isAuthenticated?: boolean } function ProtectedRoute(props: Props) { const { isLoading, data } = ...
export function convertDurationToTimeString(duration: number) { const hours = Math.floor(duration / 3600); const minutes = Math.floor((duration % 3600) / 60); const seconds = duration % 60; const timeString = [hours, minutes, seconds] .map(unit => String(unit).padStart(2 , '0')) .join('...
/*--------------------------------------------------------------------------------------------- * Copyright (c) AIDITTO AB. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information. *------------------------------------------------------------------------------...
import { Injectable, HttpException, HttpStatus } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; import { ShippingEntity } from 'src/entities'; import { ShippingRO } from './shipping.dto'; @Injectable() export class ShippingService { constructor( ...
import {RouterModule, Routes} from '@angular/router'; import {NotFoundComponent} from '../../@uea/components/not-found/not-found.component'; import {NgModule} from '@angular/core'; import {InoculationRateStatisticsComponent} from './inoculation-rate-statistics.component'; import {SixOneRateSumComponent} from './compone...
import React, { useState } from 'react' import '@testing-library/jest-dom/extend-expect' import { fireEvent, render, RenderResult, waitFor, } from '@testing-library/react' import userEvent from '@testing-library/user-event' import { Button, NumberInput } from '../..' import { UNIT_POSITION } from './constants'...
import { _OriginGroupMemberList } from "./_OriginGroupMemberList"; import { Structure as _Structure_ } from "@aws-sdk/types"; export const _OriginGroupMembers: _Structure_ = { type: "structure", required: ["Quantity", "Items"], members: { Quantity: { shape: { type: "integer" } }, ...
import React from 'react' import { storiesOf } from '@storybook/react' import { withKnobs, boolean, text, select } from '@storybook/addon-knobs' import CustomizedAsset, { CustomizedAssetProps } from 'components/CustomizedAsset' const stories = storiesOf('Customized Asset', module) const baseProps = { tokenId: 'token...
// declare namespace EChartsStat { type InputData = number[][] type OutputData = number[][] interface HistogramBins { bins: HistogramBinsBin[] data: OutputData } interface HistogramBinsBin { x0: number y0: number sample: number[] } function histogram( data: number[], binMethod: 'squareRoot' | 'sc...
import React from 'react'; import { Text } from 'components/kit'; import ErrorBoundary from 'components/ErrorBoundary/ErrorBoundary'; import { IGroupConfigPopoverProps } from 'types/components/GroupConfigPopover/GroupConfigPopover'; import stopPropagation from 'utils/stopPropagation'; import { formatValue } from 'ut...
import {listReader} from './list'; import {formReader} from './form'; import {State} from './index'; export function stateReader(state: State) { const lr = listReader(state.list); const fr = formReader(state.form); return { getListItems() { return lr.getItems(); }, getFormInput() { retur...
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *---------------------------------------------------------------...
import React from "react"; import styled from "styled-components"; import Image from "next/image"; function twoSides() { return ( <Div className="flex-center"> <div className="container flex-center"> <div className="two-side flex-center"> <div className="two-side__img"> <Image...
/** * Datart * * Copyright 2021 * * 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 t...
import { inject, injectable } from "inversify"; import RoutableTileRegistry from "../entities/tiles/registry"; import LocationResolverError from "../errors/LocationResolverError"; import IStop from "../fetcher/stops/IStop"; import IStopsProvider from "../fetcher/stops/IStopsProvider"; import ILocation from "../interfac...
<TS language="bg_BG" version="2.1"> <context> <name>AddressBookPage</name> <message> <source>Right-click to edit address or label</source> <translation>Клик с десен бутон на мишката за промяна на адрес или етикет</translation> </message> <message> <source>Create a new address</so...
/* * Copyright (c) Microsoft Corporation. * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import * as coreHttp from "@azure/core-http"; import * as Mappers from "../models/mappers...
// eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore: DataWorker import import DataWorker from './worker/vaccine.worker.ts'; import { IstanbulCoverageStore, makeProxy } from './Interceptor'; import * as unload from 'unload'; import { getWindow, universe, hasWindow, universeAttribute } from './uti...
/* @hash 3235a2c55636a769147c5b05ac626a7f */ // tslint:disable /* eslint-disable */ import { ABI } from '@neo-one/client'; export const oneABI: ABI = { events: [ { name: 'transfer', parameters: [ { forwardedValue: false, name: 'from', optional: true, ty...
/* * 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. */ export interface SavedObjectServiceError { statusCode: number; error?: st...
import { API as GitlabAPI } from 'netlify-cms-backend-gitlab'; import { unsentRequest } from 'netlify-cms-lib-util'; import type { Config as GitHubConfig, CommitAuthor } from 'netlify-cms-backend-gitlab/src/API'; import type { ApiRequest } from 'netlify-cms-lib-util'; type Config = GitHubConfig & { tokenPromise: () =...
import React, { ReactElement } from "react"; import { BrowserRouter, Switch, Route } from "react-router-dom"; import { Claim } from "./views/Claim"; import { Create } from "./views/Create"; import { Distribute } from "./views/Distribute"; import { Groups } from "./views/Groups"; import { Home } from "./views/Home"; imp...
export default class Vector { private _x: number; private _y: number; public static DIV_ZERO_WARNING: string = "Cannot divide by zero."; /** * Creates a new vector. * @param x x-component of the vector. * @param y y-component of the vector. */ public constructor(x: number = 0, ...
import { extendTheme } from '@chakra-ui/react' export const theme = extendTheme({ colors:{ highlight: "#FFBA08", highlight50: "rgba(255, 186, 8, 0.5)", dark: { black: "#000000", headingAndText: "#47585B", info: "#999999", info50: "rgba(153, 153, 153, 0.5)", }, light: { ...
import { Component } from "@angular/core"; @Component({ templateUrl: "./page-not-found.html", }) // App Component class--this is MainComponent from earlier.. export class PageNotFound { constructor() {} }
import React from 'react' // @ts-expect-error ts-migrate(7016) FIXME: Try `npm install @types/wordcloud` if it exists or... Remove this comment to see the full error message import WordCloud from 'wordcloud' import saveFile from '../../utils/fileSaver' import { ListControlCheck, Input } from 'mdui-in-react' type Words...
import React, { useState, useCallback, useEffect } from 'react'; import { useMeQuery, useProjectQuery } from '@/graphql/types'; import { useParams, useNavigate, useLocation, Outlet, } from 'react-router-dom'; import { Card, TextField, TextContainer, ContextualSaveBar, FormLayout, Modal, Frame, L...
import { ArgType } from '@storybook/addons' import { IIntroProps } from './Intro.props' import { variants } from './__fixtures__/variants' import { colors } from './__fixtures__/colors' export const argTypes : Record<keyof IIntroProps | string, ArgType> = { detail: {}, detailColor: { control: { options: ...
import { Directive, ElementRef } from '@angular/core'; @Directive({ selector: '[appSecond]' }) export class SecondDirective { constructor(private elementRef : ElementRef ) { elementRef.nativeElement.style.color="gray"; elementRef.nativeElement.style.fontWeight="bold"; elementRef.nativeElement.st...
import type { ComputedRef } from 'vue' import type { BasicTableProps, TableCustomRecord } from '../types/table' import { unref } from 'vue' import { isFunction } from '/@/utils/is' export function useTableStyle(propsRef: ComputedRef<BasicTableProps>, prefixCls: string) { function getRowClassName(record: TableCustomR...
/** * @license * Copyright 2018 Google Inc. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { AppModule } from './app'; import 'zone.js'; platformBrowserDynamic() .bootstrapModule(AppModule) .catch(err => console.error(err));
/* * Copyright 2017-2018 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at * * http://aws.amazon.com/apache2.0/ * * or in the "lic...
import { Component, OnInit, OnDestroy } from '@angular/core'; import { Http } from '@angular/http'; import { Observable } from 'rxjs/Observable'; import { BehaviorSubject } from 'rxjs/BehaviorSubject'; import { Subscription } from 'rxjs/Subscription'; import 'rxjs/add/observable/interval'; import 'rxjs/add/observable/f...
interface routesInterface { [index: string]: routeDetails } interface parameters { [index: string]: string } interface middlewareInterface { [index: string]: middlewareDetails } interface routeDetails { method: Array<string>, controller: string } interface middlewareDetails { type: string, ...
const template = ` <div class="graph-panel" ng-class="{'graph-panel--legend-right': ctrl.panel.legend.rightSide}"> <div class="graph-panel__chart" grafana-graph ng-dblclick="ctrl.zoomOut()"> </div> <div class="graph-legend"> <div class="graph-legend-content" graph-legend></div> </div> <div ng-if="ctrl.co...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. import { shallow } from 'enzyme'; import { startsWith } from 'lodash'; import * as React from 'react'; import { InlineImage, InlineImageProps, InlineImageType } from 'reports/components/inline-image'; describe('InlineImageT...
export const overview32MedNaN: string;
<TS language="sv" version="2.0"> <context> <name>AddressBookPage</name> <message> <source>Create a new address</source> <translation>Skapa en ny adress</translation> </message> <message> <source>&amp;New</source> <translation>&amp;Ny</translation> </message> <mess...
const itemArticleSchema = { type: "object", required: ["position", "article_id", "description", "amount", "price_per_item", "discount"], additionalProperties: false, properties: { position: { type: "integer", minimum: 0 }, article_id: { type: "string" }, description: { type: "string" }, amount: ...
// http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/ import IS_NODE_ENV from "../nodeJS/IS_NODE_ENV"; let requestAnimationFrame: (callback: FrameRequestCallback) => any; if (IS_NODE_ENV) { requestAnimationFrame = (callback: FrameRequestCallback) => setTimeout(callback, 1000 / 60); } else { ...
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { IonicModule } from '@ionic/angular'; import { PlaceDetailPageRoutingModule } from './place-detail-routing.module'; import { PlaceDetailPage } from './place-detail.page'; im...
import { CSSProperties } from 'react'; import { TransitionProps as _TransitionProps, TransitionActions, } from 'react-transition-group/Transition'; export type TransitionHandlerKeys = | 'onEnter' | 'onEntering' | 'onEntered' | 'onExit' | 'onExiting' | 'onExited'; export type TransitionHandlerProps = P...
import chalk from 'chalk' import { getCommandWithExecutor } from '@prisma/sdk' import type { MigrationFeedback } from '../types' export function handleUnexecutableSteps(unexecutableSteps: MigrationFeedback[], createOnly = false) { if (unexecutableSteps && unexecutableSteps.length > 0) { const messages: string[] ...
import {profile} from '../profiler/decorator'; import {Mem} from '../memory/Memory'; import {exponentialMovingAverage} from '../utilities/utils'; /** * Operational statistics, stored in Memory.stats, will be updated every (this many) ticks */ export const LOG_STATS_INTERVAL = 8; @profile export class Stats { stat...
import { TestBed } from '@angular/core/testing'; import { SignalRService } from './signal-r.service'; describe('SignalRService', () => { let service: SignalRService; beforeEach(() => { TestBed.configureTestingModule({}); service = TestBed.inject(SignalRService); }); it('should be created', () => { ...
import React from 'react'; import { BrowserRouter, Switch, Redirect } from 'react-router-dom'; import Route from './Route'; import useAuth from '../hooks/useAuth'; import SignIn from '../pages/SignIn'; import SignUp from '../pages/SignUp'; import Discover from '../pages/Discover'; import EventDetails from '../pages/E...
declare const IconToBottom: ({ width, height }: { width?: number | undefined; height?: number | undefined; }) => JSX.Element; export default IconToBottom;
import {Observable, NEVER, of as observableOf, concat} from 'rxjs' import {switchMap, map, scan, distinctUntilChanged, pairwise, startWith} from 'rxjs/operators' import {isEqual} from 'lodash' import {generateHelpUrl} from '@sanity/generate-help-url' import { PaneNode, RouterPaneSiblingContext, RouterPanes, Rou...
import { CacheStore } from "@nestjs/common"; export interface CacheManagerSetOptions { ttl?: number; } export type CacheManager = CacheStore & { name: string; set<T>(key: string, value: T, options?: CacheManagerSetOptions): Promise<void> | void; keys(pattern?: string): Promise<string[]>; reset(): Promise<vo...
import rough from "roughjs/bin/rough"; import oc from "open-color"; import { newTextElement } from "../element"; import { NonDeletedExcalidrawElement } from "../element/types"; import { getCommonBounds } from "../element/bounds"; import { renderScene, renderSceneToSvg } from "../renderer/renderScene"; import { distance...
import * as React from 'react'; import styled from 'styled-components/macro'; import { VscDebugStart, VscDebugPause } from 'react-icons/vsc'; interface MusicButtonProps extends React.HTMLAttributes<HTMLButtonElement> { play?: boolean; disabled?: boolean; size?: 'medium' | 'large'; } const PlayButton: React.Func...
import { routerMiddleware } from 'connected-react-router'; import { History } from 'history'; import { throttle } from 'lodash'; import { applyMiddleware, compose, createStore as _createStore } from 'redux'; import createSagaMiddleware from 'redux-saga'; import { defaultState } from '../commons/application/Application...
// Copyright IBM Corp. 2018,2020. All Rights Reserved. // Node module: @loopback/example-todo // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT import {ApplicationConfig, TodoListApplication} from './application'; // re-exports for our benchmark, not need...
import { types } from '../reducers/SettingsReducer' import { ISettingsState, IAction, SettingsActions, ISettingsObject } from '../interfaces/Settings.interface' export const useActions = ( state: ISettingsState, dispatch: (value: IAction) => void ): SettingsActions => { function init(initObject: ISetting...
import Koa from 'koa'; export function errorHandling() { return async (ctx: Koa.BaseContext, next: () => Promise<any>) => { try { await next(); } catch (err) { ctx.status = err.status || 500; ctx.body = err.message; ctx.app.emit('error', err, ctx); } }; }
import React from 'react' import { useNetTableValues } from 'react-panorama'; import Styles from './styles.module.css'; const avatar: Partial<VCSSStyleDeclaration> = { width: '20px', height: '20px', border: '1px solid rgba(0, 0, 0, 0.5)', borderRadius: '5px', verticalAlign: 'center', horizontalAlign: 'left...
"use strict"; import * as assert from "assert"; import {createDecoder} from "../"; const msgpack = createDecoder({noAssert: true}); const TITLE = __filename.split("/").pop(); const undef = void 0; describe(TITLE, () => { const AAA = Buffer.from([0xa3, 0x41, 0x41, 0x41]); const BBB = Buffer.from([0xa3, 0x42, ...
/** * 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. */ import {Path} from "@romejs/compiler"; import {isInTypeAnnotation} from "@romejs/js-ast-utils"; import {AnyNode} from "@romejs/ast...
import { readdirSync, readFileSync, writeFileSync } from 'fs' import { resolve } from 'path' export class FileToTs { convert(dir: string, encoding: 'base64' | 'hex') { readdirSync(dir).forEach((file) => { if (file.endsWith('.ts')) return const filename = resolve(dir, file) const data = readFile...
export class AH { static insertElement = <T extends string | object | number>( arr: T[], idx: number, el: T ) => [...arr.slice(0, idx), el, ...arr.slice(idx)]; static replaceElement = <T extends string | object | number>( arr: T[], idx: number, el: T ) => [...arr.slice(0, idx), el, ...a...
import { SidenavModule } from './sidenav.module'; describe('SidenavModule', () => { let sidenavModule: SidenavModule; beforeEach(() => { sidenavModule = new SidenavModule(); }); it('should create an instance', () => { expect(sidenavModule).toBeTruthy(); }); });
/** * See the NOTICE file distributed with this work for additional information * regarding copyright ownership. * * 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...