text stringlengths 3.08k 15.5k |
|---|
<gh_stars>10-100
import microMemoize from 'micro-memoize';
import {isBackgroundPage} from 'webext-detect-page';
import toMilliseconds, {TimeDescriptor} from '@sindresorhus/to-milliseconds';
import chromeP from 'webext-polyfill-kinda';
function timeInTheFuture(time: TimeDescriptor): number {
return Date.now() + toMill... |
<filename>src/modules/AudioDialog.ts
import { BehaviorSubject, combineLatest, Observable, Subject } from "rxjs";
import { map, tap, filter } from "rxjs/operators";
import { speakingPooling, synthSay } from "./Audio";
import _ from 'lodash';
const DefaultPolling = 500;
/**
*
* @param param0
*/
const createRecogn: (... |
import { BitError } from '@teambit/bit-error';
import { compact } from 'lodash';
import { LaneId, LocalLaneId, DEFAULT_LANE, LANE_REMOTE_DELIMITER } from '@teambit/lane-id';
import { Scope } from '..';
import { LaneNotFound } from '../../api/scope/lib/exceptions/lane-not-found';
import { BitId, BitIds } from '../../bit... |
import { Inject, Component, Input, OnInit, OnDestroy } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import * as md5 from "md5";
import {
Config, ItemTypes, ItemService, Query, QueryParameters, URIFactory as URIF
} from '@geoplatform/client';
import { NG2HttpClient } from "@geoplatform/cl... |
import { QuadStoreDataset } from './engine/dataset';
import { DatasetEngine } from './engine/dataset/DatasetEngine';
import { ApiStateMachine } from './engine/MeldState';
import { LogLevelDesc } from 'loglevel';
import { ConstraintConfig, constraintFromConfig } from './constraints';
import { DomainContext } from './eng... |
import * as vscode from 'vscode';
import {Article, DevAPI} from '../api/DevApi';
import {titleParser, publishStateParser} from './MetaParser';
import {resourceUriBuilder} from '../content/ResourceUriBuilder';
const emptyArray = new Uint8Array(0);
export class DevArticleVirtualFSProvider implements vscode.FileS... |
<reponame>addBots/typescript-checker<filename>src/core.ts
import { stringifyObject } from "./utils"
type TypeNames = "string" | "number" | "boolean" | "undefined" | "function" | "object"
type Types = string | number | boolean | undefined | Function | object | null
type TypeNameType<T extends TypeNames> = T extends "s... |
import * as React from "react";
import { Container } from "ethstats-ui/lib/layout/Container";
import { Sidebar } from "ethstats-ui/lib/layout/sidebar/Sidebar";
import { Content } from "ethstats-ui/lib/layout/Content";
import { Logo } from "./sidebar/Logo";
import { Spacer } from "ethstats-ui/lib/layout/Spacer";
import ... |
import ol = require("openlayers");
import $ = require("jquery");
import { Input } from "ol3-input/ol3-input/ol3-input";
import { OpenStreet } from "ol3-input/ol3-input/providers/osm";
import { cssin, navigation } from "ol3-fun/index";
import { ArcGisVectorSourceFactory } from "ol3-symbolizer/ol3-symbolizer/ags/ags-sou... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*-------------------------------------------------------------------------... |
/*
* Copyright (c) BrownBear, 2016-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 Foundation; either version 2 of the License, or
* (at ... |
<reponame>hailongz/ik
import { Expression, Node, ObjectExpression, SpreadElement, ObjectProperty, StringLiteral, NumericLiteral, BooleanLiteral, Identifier, ConditionalExpression, UnaryExpression, MemberExpression, BinaryExpression, CallExpression, ArrayExpression } from "@babel/types"
import { parseExpression } from ... |
// package: protos
// file: peer/proposal.proto
import * as jspb from "google-protobuf";
import * as peer_chaincode_pb from "../peer/chaincode_pb";
import * as peer_proposal_response_pb from "../peer/proposal_response_pb";
export class SignedProposal extends jspb.Message {
getProposalBytes(): Uint8Array | string;
... |
<reponame>thevvx/Nintod
import { SlashCommandBuilder, SlashCommandUserOption } from "@discordjs/builders";
import { Client, CommandInteraction, MessageButton, MessageComponentInteraction, MessageEmbed } from "discord.js";
// Tic-Tac-Toe class
class TicTacToe {
board: number[][];
constructor() {
this.board = [... |
<gh_stars>0
import { Notice, Setting } from 'obsidian';
import {
MinimalPlugin,
type MinimalPluginSettings,
type UnknownObject,
} from 'plugins/Shared';
import {
CloudinaryDirectApi,
type CloudinaryApi,
type CloudinaryResponseCallback,
type CloudinaryResponseErrorCallback,
} from './CloudinaryApi';
import { Moda... |
/*
* @license Spanboon Platform v0.1
* (c) 2020-2021 KaoGeek. http://kaogeek.dev
* License: MIT. https://opensource.org/licenses/MIT
* Author: p-nattawadee <<EMAIL>>, Chanachai-Pansailom <<EMAIL>>, Americaso <<EMAIL>>
*/
import { OnInit, Component, Input, ViewChild, EventEmitter } from '@angular/core';
import { ... |
/*
Copyright (c) 2020 <NAME> Co., Ltd.
https://www.cocos.com/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated engine source code (the "Software"), a limited,
worldwide, royalty-free, non-assignable, revocable and non-exclusive license
to use Cocos Cre... |
<gh_stars>1-10
import { AzureFunction, Context, HttpRequest } from "@azure/functions"
import { BlobServiceClient, StorageSharedKeyCredential } from "@azure/storage-blob";
import { Client } from '@notionhq/client';
import { AppendBlockChildrenParameters, CreatePageParameters } from "@notionhq/client/build/src/api-endpoi... |
import { LiveService } from '../liveService/liveService.service';
import { IEnvironmentConfig } from '../../index.module';
export interface ISubscriber {
update: (boolean?) => void; // tslint:disable-line
updateEditor?: (MapController) => void; // tslint:disable-line
}
export interface ILatLng {
lat: number;
... |
export const protocols = ["webtty"];
export const msgInputUnknown = '0';
export const msgInput = '1';
export const msgPing = '2';
export const msgResizeTerminal = '3';
export const msgSetEncoding = '4';
export const msgUnknownOutput = '0';
export const msgOutput = '1';
export const msgPong = '2';
export const msgSetW... |
<gh_stars>100-1000
import { Clock, State, Universe } from "co-consistent"
import { Action, Store, StoreLink, Subscriber } from "co-share"
export class ConsistentStore extends Store {
subscriber: Subscriber<Store, [time: number, value: number, directionInverted: boolean]> = Subscriber.create(
ConsistentStor... |
import * as _ from 'underscore';
import {
LatLng,
LegMode,
ProfileOption,
StreetEdgeInfo,
TransitEdgeInfo,
TransitModes,
ZonedDateTime,
} from '../../common/r5-types';
import {Route, Step, SummaryStep} from '../route';
import {Feature} from '../../../utils';
export const SECONDS_PER_HOUR = 3600;
export... |
<filename>src/cube.ts<gh_stars>1-10
import {
BasicRotation,
CubeType,
Direction,
Face,
NormalizedDirection,
WideRotation,
} from './type';
import {
baseRotate,
copy,
isBasicWideRotation,
moveColumn,
normalize,
reverseDirection,
setBase,
} from './utils';
export {
CubeType,
CubeFace,
Dir... |
import React, { useState, useEffect } from 'react';
import { Units } from './defy/models'
import { RacePlan } from './ch/models';
import { PlanRepo, availablePlans, availablePlansById, AvailablePlan } from './ch/planrepo';
import { endOfWeek, addWeeks, isAfter } from 'date-fns';
import { dayOfWeek } from './ch/dategrid... |
import * as React from "react";
import { clone, cloneDeep, get, isEqual, isPlainObject, mergeWith, set } from "lodash-es";
import * as tv4 from "tv4";
import {
ChildOptionItem,
getChildOptionBySchemaId,
getDataLocationsOfChildren,
getPartialData,
mapSchemaLocationFromDataLocation,
normalizeDataL... |
import {CdkTableModule} from '@angular/cdk/table';
import {
dispatchMouseEvent
} from '@angular/cdk/testing';
import {Component, ElementRef, ViewChild} from '@angular/core';
import {async, ComponentFixture, inject, TestBed} from '@angular/core/testing';
import {By} from '@angular/platform-browser';
import {NoopAnimat... |
import React, { useState } from 'react'
import { Dispatch } from 'redux'
import { connect } from 'react-redux'
import kebabCase from 'lodash/kebabCase'
import { Trash2, Book, Folder, X, UploadCloud, Plus, Settings, Bookmark } from 'react-feather'
import { Folders } from 'constants/enums'
import { CategoryItem, NoteItem... |
<filename>src/app/models/game-state/game-state.reducer.ts
import {
GameStateActions,
GameStateAddGoldAction,
GameStateAddInventoryAction,
GameStateBoardShipAction,
GameStateDeleteAction,
GameStateDeleteFailAction,
GameStateDeleteSuccessAction,
GameStateEquipItemAction,
GameStateHealPartyAction,
Game... |
<filename>src/transport.ts
import FormData = require('form-data');
import { Response } from 'node-fetch';
import * as util from 'util';
import { URL } from 'whatwg-url';
import { request, RequestOptions } from './request';
import { noop, sanitizeURL } from './utils';
/** Default URL of the Zeus server. */
export const... |
import {
ICommandService,
ICommand,
ICommandRunOptions,
IInquirer,
IBlueprintWriter,
IBlueprintWriterSession,
IExecutor,
} from "../defs";
import { ContainerInstance, Inject, EventManager } from "@bluelibs/core";
import { BlueprintWriterSession } from "../models/BlueprintWriterSession";
import { PrompterS... |
import React, { useState, useEffect } from "react";
import { RouteComponentProps } from "react-router";
import styled from "styled-components";
import Filter from "../../data/Filter";
import IEntity from "../../data/IEntity";
import { reciveAllFiltered } from "../../services/DatabaseService";
import { LoadingSpinner }... |
<filename>src/symbol.ts
/* Copyright (c) <NAME>
* Licensed under the ISC Licence.
*/
'use strict';
import { TypeString } from './typeString';
import { BinarySearch } from './types';
import { Location, Range } from 'vscode-languageserver-types';
import { Predicate, HashedLocation } from './types';
import * as util f... |
import { Injectable } from '@angular/core';
import {HttpClient, HttpErrorResponse} from '@angular/common/http';
import {Observable, throwError} from 'rxjs';
import {retry, catchError} from 'rxjs/operators';
import {ModalController, NavController, ToastController} from '@ionic/angular';
import {auth} from 'firebase';
im... |
<reponame>probablymorganw/image-url<filename>src/urlForImage.ts
import parseAssetId from './parseAssetId'
import parseSource from './parseSource'
import {
CropSpec,
HotspotSpec,
ImageUrlBuilderOptions,
ImageUrlBuilderOptionsWithAsset,
SanityAsset,
SanityImageFitResult,
SanityImageRect,
SanityReference,
... |
<gh_stars>0
import {Injectable} from '@angular/core';
import {BehaviorSubject, fromEvent} from 'rxjs';
import {BotInfo, BrowserInfo, detect, NodeInfo} from 'detect-browser';
export enum LayoutSize {
VERYSMALL,
SMALL,
BIG,
VERYBIG
}
export interface LayoutSizeData {
layoutSize: LayoutSize;
widt... |
<reponame>mdr/llama-wars
import * as R from 'ramda'
import { UnitOrBuilding, WorldState } from '../world-state'
import {
ChatWorldEvent,
CombatWorldEvent,
GameOverWorldEvent,
GameStartedWorldEvent,
InitialiseWorldEvent,
PlayerAddedWorldEvent,
PlayerChangedNameWorldEvent,
PlayerDefeatedWorldEvent,
Play... |
import React from 'react';
import ReactDOM from 'react-dom';
import debounce from 'lodash/debounce';
import { isSafari, popupSupported, popupWindowBorder } from './BrowserPopupWindow';
interface Feature {
width?: number;
height?: number;
left?: number;
top?: number;
}
interface Props {
children?: React.Reac... |
/**
* Tab reducer
*/
import { Update, Dictionary } from "@ngrx/entity"
import { TabModel } from "./tab.model"
import {
NavigationSelectTabType,
navigateSelectTab,
addTab,
sortTab,
selectTab,
renameTab,
editTab,
deleteTab,
clearTabs,
updateTab,
} from "./tab.actions"
import { cr... |
import React, { FunctionComponent, useState } from 'react';
import {
Button,
Card,
CardHeader,
CardTitle,
CardBody,
CardExpandableContent,
Flex,
Grid,
Label,
Level,
List,
ListItem
} from '@patternfly/react-core';
import ExternalLink from '../ExternalLink';
import ArrowRightIcon from '@patternfly... |
const decoder = new TextDecoder('windows-1252');
let mapping_array = new Uint8Array(256);
for(let i = 0; i < 256; i++) mapping_array[i] = i;
let mapping_string = decoder.decode(mapping_array);
let encode_mapping = new Map<number,number>();
for(let i = 0; i < 256; i++) {
encode_mapping.set(mapping_string.char... |
import { AfterViewInit, Component, OnChanges, OnInit } from '@angular/core';
import { FormControl, FormBuilder, FormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import { ArticlesService } from '../shared/backend/articles.service';
import { CategoriesService } fro... |
import React, { useCallback, useEffect, useState } from "react";
import { Row, Col, Radio } from "antd";
import { ColorResult } from "react-color";
import Upload from "../Upload";
import s from "./Background.module.less";
import Color from "../Color";
import {
BackgroundCommonTypesOfStyleItems,
BackgroundGradient... |
import fs from 'fs';
import fsp from 'fs/promises';
import path from 'path';
import sodium from 'tweetsodium';
import axios from 'axios';
import { PackageJson } from 'type-fest';
import { SemVer } from 'semver';
import { Toolkit } from 'actions-toolkit';
import {
ProcessEnvVersionSecrets,
NoCommitNecessaryError... |
<reponame>aweisberg/quix<gh_stars>0
import UrlPattern from 'url-pattern';
import {
IUser,
IFile,
INotebook,
INote,
IFolder,
createUser,
createNotebook,
createFolder,
createFile,
createNote,
createFolderPayload,
} from '../../shared';
const mocks = {
'/api/user': () => createUser(),
'/api/even... |
import * as moment from 'moment';
import { isEmpty } from 'lodash';
import { ObservationValuePipe } from '@cardihab/angular-fhir';
interface INameFormatArgs {
noTitle?: boolean;
capitaliseLastName?: boolean;
firstNameFirst?: boolean;
}
export function formatAddress(organisation: fhir.Organization, types?: stri... |
import moment, { Moment } from 'moment';
/**
* Return 2 date is same month.
*/
export function sameMonth(a: Moment, b: Moment) {
return (
a.toDate().getFullYear() === b.toDate().getFullYear() &&
a.toDate().getMonth() === b.toDate().getMonth()
);
}
/**
* Return 2 date is same month, year, day.
*/
expor... |
<reponame>saby/saby-ui
import * as React from 'react';
import { logger } from 'Application/Env';
import type { IGeneratorAttrs } from '../interfaces';
import type { Control } from 'UICore/Base';
import type { IControlOptions } from 'UICommon/Base';
const REACT_FIBER_FIELD = '$$typeof';
const SYMBOL_REACT_ELEMENT = Sym... |
<gh_stars>0
import { CSSResultGroup, LitElement, TemplateResult, html, unsafeCSS } from 'lit';
import { customElement, property } from 'lit/decorators';
import { until } from 'lit/directives/until.js';
import { HomeAssistant } from 'custom-card-helpers';
import { signedPathSchema } from '../types';
import type { Exten... |
<filename>packages/grouped-layer-list/src/searchUtils.ts<gh_stars>1-10
import { Handle } from "esri";
import LayerList from "esri/dijit/LayerList";
import Extent from "esri/geometry/Extent";
import webMercatorUtils from "esri/geometry/webMercatorUtils";
import ArcGISDynamicMapServiceLayer from "esri/layers/ArcGISDynami... |
<filename>src/main/tls.ts
import {promises as fs} from 'fs'
import * as path from 'path'
import * as childProcess from 'child_process'
import {promisify} from 'util'
import * as os from 'os'
import {URL} from 'url'
import {generate as generatePassword} from 'generate-password'
import {ElectronLog} from 'electron-log'
i... |
<reponame>ludovicc/sdm-pack-docker<filename>lib/docker/executeDockerBuild.ts
/*
* Copyright © 2018 Atomist, 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.apac... |
<reponame>DadMl/openedge-zext
import * as vscode from 'vscode';
import cp = require('child_process');
import path = require('path');
import { outputChannel, showStatusBar, STATUS_COLOR, errorDiagnosticCollection, warningDiagnosticCollection, hideStatusBar } from './notification';
import { getConfig } from './ablConfig'... |
import "~/types/module";
import type { default as babel, PluginObj } from "@babel/core";
import cssnanoPresetAdvanced from "cssnano-preset-advanced";
import postcss, { Transformer, Plugin } from "postcss";
import nested from "postcss-nested";
import * as browserslists from "~/browserslists";
import { createHash } from ... |
import React, { useState } from 'react';
import styled from 'styled-components';
import { Formik } from 'formik';
import * as yup from 'yup';
import Layout from '../../components/Layout';
import SEO from '../../components/seo';
import Box from '../../components/system/Box';
import FieldText from '../../components/Fiel... |
// Copyright 2020 <NAME>
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
import { KeyAndValue, XmlNode } from "./XmlNode.ts";
import { XmlTree } f... |
import "../../styles/variables.css";
import "./chart.css";
import React, {
forwardRef,
useCallback,
useEffect,
useImperativeHandle,
useMemo,
useRef,
useState,
} from "react";
import { INITIAL_NUM_CANDLES } from "../../constants";
import {
constructTopLevelSpec,
getCandleWidth,
getSubMinutes,
} fro... |
import { SerializableAsync } from "@js-soft/ts-serval"
import {
CoreBuffer,
CryptoCipher,
CryptoExchangeKeypair,
CryptoExchangePrivateKey,
CryptoExchangePublicKey,
CryptoRelationshipRequestSecrets,
CryptoRelationshipSecrets,
CryptoSecretKey,
CryptoSignatureKeypair,
CryptoSignatur... |
<reponame>yuce/hazelcast-nodejs-client
/*
* Copyright (c) 2008-2022, Hazelcast, 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/lice... |
import Ekspanderbartpanel from "nav-frontend-ekspanderbartpanel";
import React from "react";
import {useSelector} from "react-redux";
import styled from "styled-components";
import {format, formatDistance} from "date-fns";
import {nb} from "date-fns/locale";
import {SkjemaContent} from "../../nav-soknad/components/Skje... |
<reponame>sparGuan/-cookbook
import Music, { IMusic } from '../../db/schema/music';
// const musicAPI = require("@suen/music-api");
const musicAPI = require('music-api-next');
const axios = require("axios");
export default class MusicService {
private musicList: IMusic[];
private music: IMusic;
private song... |
<reponame>gribbet/traymarch<gh_stars>0
/**
* Functionality related to rendering a [[Scene]] in a WebbGL context
*/
/** Imports */
import { build } from './build';
import { Options } from './options';
import { Scene } from './scene';
/** Interface to render a scene to a WebGL context */
export interface Renderer {
... |
// @ts-nocheck - typsescript disabled for tis files
import { store } from 'store';
import { setShowOverlay } from 'store/room/room.slice';
import * as wss from './wss';
import Peer, { SignalData } from 'simple-peer';
import { SignalingData } from 'types';
import { fetchTURNCredentials, getTURNIceServers } from './turn'... |
import plusnew, { Component, store } from "@plusnew/core";
import type { Context, Props, ApplicationElement } from "@plusnew/core";
import type ComponentInstance from "@plusnew/core/src/instances/types/Component/Instance";
import type Instance from "@plusnew/core/src/instances/types/Instance";
import type { entitiesCon... |
import * as _ from 'lodash';
import * as basic_auth from 'basic-auth';
import * as utils from '../utils';
import * as ldap from '../ldap';
import { oneExistingPerson } from '../search_ldap';
import * as search_ldap from '../search_ldap';
import { selectUserProfile, merge_v } from '../step_attrs_option';
import * as esu... |
import crypto from 'crypto';
import { EventEmitter } from 'events';
import WebSocket from 'ws';
import {
EventClientError,
EventStateChange,
EventWSAuthResult,
EventWSData,
StateConnected,
StateConnecting,
StateDisconnected,
StateWaitingToReconnect
} from './constants';
import {ProtobufStream} from '.... |
type EventHandlers<T extends keyof HTMLElementTagNameMap> = {
[K in keyof HTMLElementEventMap]?: (
this: HTMLElementTagNameMap[T],
ev: HTMLElementEventMap[K]
) => any
};
export type Props<T extends keyof HTMLElementTagNameMap> =
Partial<HTMLElementTagNameMap[T]> | {
classList?: Arra... |
<gh_stars>0
import _ from 'lodash'
import { ErrorMapper } from 'utils/ErrorMapper'
import { CreepJob } from 'utils/creep'
import GeneralType from 'type/general'
import StaticType from 'type/static'
import Idler from 'role/idler'
import Builder from 'role/builder'
import Harvester from 'role/harvester'
import Repairer ... |
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import * as vscode from 'vscode';
import * as cross_spawn from 'cross-spawn';
import * as child_process from 'child_process';
import * as xmldom from "xmldom";
import * as xpath... |
<gh_stars>100-1000
import PluginSDK from "PluginSDK";
import {
REQUEST_SYSTEM_LOG_ERROR,
REQUEST_SYSTEM_LOG_SUCCESS,
REQUEST_PREVIOUS_SYSTEM_LOG_ERROR,
REQUEST_PREVIOUS_SYSTEM_LOG_SUCCESS,
REQUEST_SYSTEM_LOG_STREAM_TYPES_ERROR,
REQUEST_SYSTEM_LOG_STREAM_TYPES_SUCCESS,
} from "../constants/ActionTypes";
imp... |
import axios from "axios";
import { syncFileWithS3 } from "../../utils/AWSS3Client";
import * as fs from "fs";
import { createEntryFile } from "./nodejs/createEntryFile";
import { createPackageJson } from "./nodejs/createPackageJson";
import * as os from "os";
import { API } from "../../config/api";
const Zip = requir... |
import { Component, OnInit, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import * as moment from 'moment';
import * as momentTz from 'moment-timezone';
import { FormGroup, FormBuilder, Validators, FormArray, FormControl, FormGroupDirective } from '@angular/for... |
import { BigNumber, Contract, providers } from 'ethers'
import { RootState } from 'src/app/rootReducer'
import { getContract } from 'src/blockchain/contracts'
import { isSignerLedger } from 'src/blockchain/signer'
import { getCurrentNonce, sendSignedTransaction, signTransaction } from 'src/blockchain/transaction'
impor... |
import { ProjectRevision } from '@ips/shared-js';
import Button from '@material-ui/core/es/Button';
import Dialog from '@material-ui/core/es/Dialog';
import DialogActions from '@material-ui/core/es/DialogActions';
import DialogContent from '@material-ui/core/es/DialogContent';
import DialogTitle from '@material-ui/core... |
import {
createContext,
Dispatch,
FC,
FormEvent,
MouseEvent,
SetStateAction,
useContext,
useState
} from "react";
import { ClassNames } from "@44north/classnames";
export interface IFormComponentProps {
/**
* Classes to be applied to the form element
*/
className?: str... |
<gh_stars>0
import { Bundle, BundleComponent } from 'types/types'
type Product = Omit<
BundleComponent,
| 'variant_id'
| 'charge_interval_frequency'
| 'order_interval_frequency'
| 'order_interval_unit'
| 'fulfillment_service'
| 'requires_shipping'
| 'taxable'
>
export const PRODUCTS: Product[] = [
{... |
import { ElementSpec, elementSpecEntries, elementDefaults } from './element';
import { CanvasVar, canvasVars } from './expression';
import { WithAnimSpec, withAnimSpec, animDefaults } from './animation';
import { LabelSpec, labelSpec, labelDefaults, createLabelDictDefaults } from './label';
import { NodeSpec, nodeSpec,... |
/**
* Copyright 2020 Opstrace, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... |
<reponame>mdtusz/webgl-rs<filename>src/lib.ts<gh_stars>10-100
let ctx: WebGLRenderingContext;
let ctxs: WebGLRenderingContext[] = [];
let programs: WebGLProgram[] = [];
let shaders: WebGLShader[] = [];
let buffers: WebGLBuffer[] = [];
let textures: WebGLTexture[] = [];
let uniforms: WebGLUniformLocation[] = [];
let ... |
import {BaseDomainClass} from "../../common_classes/base_domain_class";
import {IsBoolean, IsNotEmpty, IsNumber, IsObject, IsOptional, IsString, IsUUID, ValidateIf} from "class-validator";
import {Expose, plainToClass, Transform} from "class-transformer";
import Container from "../ontology/container";
import MetatypeRe... |
<gh_stars>0
import { Selector as CSSSelector, CssSelectorParser } from 'css-selector-parser';
interface NodeLikeObject {
nodeName: string;
parentNode: this | null;
}
interface ElementLikeObject extends NodeLikeObject {
id?: string;
classList?: string[] | DOMTokenList;
childNodes: (NodeLikeObject | ElementLikeObj... |
<reponame>cbsch/easy-api
import { Table, SelectArgs, Column, GeneratedModel } from "../interfaces";
import { generatedModel } from '../model'
import * as debugFactory from 'debug'
const debug = debugFactory('easy-api:sql:pg')
const joinTableColumnSplit = '___'
export function generateCreateColumn(def: Column) {
... |
/*
Created by: <NAME>
Githu: https://github.com/hviana
Page: https://sites.google.com/site/henriqueemanoelviana
cel: +55 (41) 99999-4664
*/
/*
This project uses a version of Open English Wordnet in Sqlite form made
available by: https://github.com/x-englishwordnet/sqlite
queries:
`SELECT s.synset2id, s.synset1id, link... |
export interface PostsResponse {
kind: string;
data: {
after: string;
dist: number;
modhash: string;
children: Children[];
};
}
interface Children {
kind: string;
data: RawEntry;
}
export interface RawEntry {
approved_at_utc?: Date;
subreddit: string;
selftext: string;
author_fullnam... |
/* eslint-disable */
import {
ASN1Element as _Element,
ASN1TagClass as _TagClass,
OPTIONAL,
} from "asn1-ts";
import * as $ from "asn1-ts/dist/node/functional";
import {
Certificate,
_decode_Certificate,
_encode_Certificate,
} from "../AuthenticationFramework/Certificate.ta";
import ... |
<gh_stars>1-10
import { MIDIEvent, TempoEvent, TimeSignatureEvent } from "./midi_events";
export const SEQUENCE_NUMBER = "sequence number";
export const TEXT = "text";
export const COPYRIGHT_NOTICE = "copyright notice";
export const TRACK_NAME = "track name";
export const INSTRUMENT_NAME = "instrument name";
export co... |
<reponame>sumukshashidhar/athena<filename>angular/src/app/components/students/achievements/achievements.component.ts
import { AuthService } from "./../../../shared/auth/auth.service";
import { Component, OnInit } from "@angular/core";
import * as $ from "jquery";
import { AchievementsService } from "./../../../shared/a... |
import { HandlerDetails, ipcMain } from "electron";
import Window from "../modular/window";
import { deepCopy, isNull, random, ranDom } from "@/lib/util";
import { snowflake } from "@/lib/util/snowflake";
import { JSDOM } from "jsdom";
import { Global } from "../modular/general/global";
import { readFile } from "../mod... |
<reponame>rchamara/UraniumJS<gh_stars>1-10
import {Element} from '../_uraniumview/element';
import {_setFlagPoint, _getElementCollectons, eventListnerArray} from '../_global/globalvariable';
import {initTriggerHeight, flagPoint} from '../_global/globalvariable';
import {styleAttributes} from '../_global/styleAttributs'... |
import {
AST_NODE_TYPES,
ESLintUtils,
TSESTree,
TSESLint,
} from '@typescript-eslint/experimental-utils';
const createRule = ESLintUtils.RuleCreator(() => '');
type Options = [
{
followExactOptionalPropertyTypes?: boolean;
},
];
type MessageIds =
| 'exactOptionalPropertyTypesError'
| 'propertyOpt... |
// Header ...
//
//
// ░▀▀█░█░█░█▀▄░▀█▀░█░░░█▀█░█▀█░▀█▀░░░░░█▀▀░█░█░█▀█░█▀▀░█▀█░█▄█░█▀█░█░░░█▀▀
// ░░░█░█░█░█▀▄░░█░░█░░░█▀█░█░█░░█░░▄▄▄░█░█░█░█░█▀█░█░░░█▀█░█░█░█░█░█░░░█▀▀
// ░▀▀░░▀▀▀░▀▀░░▀▀▀░▀▀▀░▀░▀░▀░▀░░▀░░░░░░▀▀▀░▀▀▀░▀░▀░▀▀▀░▀░▀░▀░▀░▀▀▀░▀▀▀░▀▀▀
// ░█▀▄░█▀█░█▀▄░█▀▄░█▀█░█▀▄░█▀▀░░░█▀▄░█▀█░▀█▀
// ... |
import _isEmail, { IsEmailOptions } from 'validator/es/lib/isEmail';
import _isMobilePhone from 'validator/es/lib/isMobilePhone';
import _isIP from 'validator/es/lib/isIP';
import _isURL, { IsURLOptions } from 'validator/es/lib/isURL';
const CHINESE_LOCALE_CODE = 'zh-CN';
/**
* 是否是中国手机号码
* @param phoneNumber
* @re... |
<reponame>NotWoods/query-pouch-gtfs<gh_stars>0
import { StopTime, Trip, Stop, Calendar } from '../interfaces';
import { trip } from '../uri';
import { getDays } from './calendar';
import { getTripSchedule, scheduleRange, stopTimesForStop } from './stop_times';
import { getStop, getTrip } from '../getters';
export inte... |
import some from 'lodash/some';
import get from 'lodash/get';
import { Component } from '@angular/core';
import { JsonFormsArrayControl } from '@jsonforms/angular';
import { NgRedux } from '@angular-redux/store';
import {
ArrayControlProps,
ControlElement,
JsonFormsState,
mapDispatchToArrayControlProps,
mapSt... |
/* eslint-disable */
import {
ASN1Element as _Element,
ASN1TagClass as _TagClass,
INTEGER,
OPTIONAL,
} from "asn1-ts";
import * as $ from "asn1-ts/dist/node/functional";
/* START_OF_SYMBOL_DEFINITION Accuracy */
/**
* @summary Accuracy
* @description
*
* ### ASN.1 Definition:
*
* ... |
import { $$, IOffset } from './Dom';
export interface IPopupPosition {
vertical: PopupVerticalAlignment;
horizontal: PopupHorizontalAlignment;
verticalOffset?: number;
horizontalOffset?: number;
horizontalClip?: boolean;
}
export enum PopupVerticalAlignment {
TOP,
MIDDLE,
BOTTOM,
INNERTOP,
INNERBO... |
import * as d3 from 'd3';
export class ViewBox {
a: number;
b: number;
c: number;
d: number;
imageHeight: number;
imageWidth: number;
/**
* @param imageWidth - Width of the contained image.
* @param imageHeight - Height of the contained image.
*/
constructor (imageWidth: number, imageHeight:... |
import React, { useContext, useState, useEffect } from 'react'
import styled, { ThemeContext } from 'styled-components'
import { Text } from 'rebass'
import { ApplicationModal } from '../../state/application/actions'
import { useModalOpen, useToggleLinksModal } from '../../state/application/hooks'
import { X, Twitter, ... |
/* eslint global-require: off, no-console: off */
/**
* This module executes inside of electron's main process. You can start
* electron renderer process from here and communicate with the other processes
* through IPC.
*
* When running `yarn build` or `yarn build-main`, this file is compiled to
* `./app/main.pr... |
import { toName } from '../name';
import { NAME_ARRAY, NAME_RETURNVALUE } from '../names';
import {
DEFAULT_RANGE, ModifierFlags, UCMethodLikeSymbol, UCMethodSymbol, UCParamSymbol,
UCPropertySymbol, UCStructSymbol
} from './';
import {
StaticDelegateType, StaticFloatType, StaticIntType, StaticNameType, Stat... |
<filename>src/utils/index.ts
import browser, { WebRequest } from 'webextension-polyfill';
import { getScripts } from '../browser';
// eslint-disable-next-line no-control-regex
const regex = /[<>:"/\\|?*\x00-\x1F]/g;
export async function verifyFileName(name: string): Promise<boolean> {
const platformInfo = await b... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.