text
stringlengths
3.08k
15.5k
<filename>src/commons/Api.ts import 'whatwg-fetch'; import { Moment } from 'moment'; import * as queryString from 'query-string'; import last from 'lodash-es/last'; import isNil from 'lodash-es/isNil'; import { Pageable } from './Page'; import { ConversationStatus } from './Constants'; import { List } from 'lodash'; i...
import { Component, OnDestroy, OnInit } from "@angular/core"; import { TranslateService } from "@ngx-translate/core"; import axios from "axios"; import { ToastrService } from "ngx-toastr"; import { Subscription } from "rxjs"; import { Beatmap } from "../../../../models/cache"; import { Collection } from "../../../../mo...
import React, { useEffect, useState } from 'react'; import { useDispatch } from 'react-redux'; import styled from 'styled-components'; import { setShowConfirmTransactionModal, setSwapDirection, updateSelectedAsset, } from '../../../redux/actions/bridge'; import { ethereumProviderSelector, isNetworkPermittedSelecto...
///  <reference types="node"/> // TODO: // - SOCKS proxy // - Example with obsf4 // - HTTP proxy https://nodejs.org/api/http.html#http_event_connect // - HTTP request over socket // - newServiceAdaptor // // App TODO: // - Handle encrypt/decrypt errors // - Use line buffering import * as child_process from 'child_proc...
<reponame>donaldskip326/gauzy1<filename>apps/gauzy/src/app/pages/tasks/components/my-task-dialog/my-task-dialog.component.ts import { Component, Input, OnInit } from '@angular/core'; import { ITask, IOrganizationProject, IEmployee, ITag } from '@gauzy/contracts'; import { FormGroup, FormBuilder, Validators } from '@ang...
<reponame>willhaben/javascript-sdk /** * Copyright 2019-2021, Optimizely * * 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 req...
<filename>packages/node-opcua-address-space/src/data_access/ua_two_state_discrete.ts import assert from "node-opcua-assert"; import { coerceLocalizedText, LocalizedText, LocalizedTextLike, QualifiedNameLike } from "node-opcua-data-model"; import { DataType, Variant, VariantLike } from "node-opcua-variant"; import { Var...
import * as React from "react"; import * as PropTypes from "prop-types"; import { codes } from "keycode"; import AddBlurEvent from "../common/AddBlurEvent"; import AppBarButton from "../AppBarButton"; import AppBarSeparator from "../AppBarSeparator"; import ListView from "../ListView"; export interface DataProps { ...
<filename>src/Path.ts export class Path{ public static parentId = '^'; public _isRelative: boolean; public _components: Path.Component[]; public _componentsString: string | null; constructor(); constructor(componentsString: string); constructor(head: Path.Component, tail: Path); constructor(head: Path.Compone...
<gh_stars>0 jest.mock("i18next", () => ({ t: (i: string) => i })); jest.mock("../../../api/crud", () => ({ overwrite: jest.fn() })); import { commitBulkEditor, setTimeOffset, toggleDay, setSequence } from "../actions"; import { fakeState } from "../../../__test_support__/fake_state"; import { buildResourceIndex } ...
<gh_stars>0 import { addInt, addFloat, half, double, repeat } from './utils'; export function number2Memory(num: number | string) { num = typeof num === 'number' ? String(num) : num; let sign: string = '0'; if (num[0] === '-') { sign = '1'; num = num.slice(1); } const num_splits = num.split('.'); ...
<reponame>terrorizer1980/nem-coinbase-token-sale-api<filename>src/services/coinbase-service.ts import { DB_PRODUCTS, Product } from 'model/product'; import { ObjectID } from 'mongodb'; import { onChargeSuccess } from 'services/purchase-service'; import { coinbaseTokenPurchaseDescription, stEndUser } from 'utilities/err...
// Copyright (C) 2020-2022 <NAME>. All rights reserved. MIT license. import { Deferred, deferred, } from "https://deno.land/std@0.96.0/async/deferred.ts#^"; import { Storage } from "./storage.ts"; import { Metainfo } from "./metainfo.ts"; import { announce } from "./tracker.ts"; import { AnnounceEvent, Announ...
<reponame>brietsparks/normalized-reducer import { Schema, EntitySchema, RelationSchema, EntitiesByType, IdsByType, State } from './interfaces'; import { Cardinalities } from './enums'; import { validateSchema } from './validator'; export class ModelSchemaReader { schema: Schema; entitySchemaReaders: Record<strin...
/** * Sigma.js WebGL Renderer Edge Program * ===================================== * * Program rendering edges as thick lines but with a twist: the end of edge * does not sit in the middle of target node but instead stays by some margin. * * This is useful when combined with arrows to draw directed edges. */ im...
import { deepEqual, fail } from 'assert'; import { Before, Given, Then, When } from 'cucumber'; import { resolve } from 'path'; import { ANONYMOUS, APP } from './consts'; import getTokens from './get-tokens'; import { getImpactedFile } from './impacted'; import { findSymbols } from './line-impact'; import { processFile...
<filename>src/im_test.ts /*! Copyright 2018 Propel http://propel.site/. 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....
<filename>src/annotations/blameAnnotationProvider.ts 'use strict'; import { CancellationToken, Disposable, Hover, languages, Position, Range, TextDocument, TextEditor } from 'vscode'; import { AnnotationProviderBase } from './annotationProvider'; import { ComputedHeatmap, getHeatmapColors } from './annotations'; import...
<reponame>TimoFreiberg/rust-analyzer import * as lc from "vscode-languageclient"; import * as vscode from 'vscode'; import * as ra from './rust-analyzer-api'; import { Ctx, Disposable } from './ctx'; import { sendRequestWithRetry, isRustDocument, RustDocument, RustEditor } from './util'; export function activateInla...
<gh_stars>0 /** * Represent cookie's additional attributes */ type Attributes = Partial<{ /** Path to location this cookie is available. By default is `/` */ path: string, /** At which date cookie expires */ expires: string | Date, /** Max age of cookie in seconds */ maxAge: number, /** Domain within which the...
/* eslint-disable @typescript-eslint/no-explicit-any */ import type { CODE_BLOCK_TYPE, RICOS_DIVIDER_TYPE, DIVIDER_TYPE, RICOS_FILE_TYPE, FILE_UPLOAD_TYPE, RICOS_GALLERY_TYPE, GALLERY_TYPE, RICOS_GIPHY_TYPE, GIPHY_TYPE, RICOS_HTML_TYPE, HTML_TYPE, RICOS_IMAGE_TYPE, IMAGE_TYPE, RICOS_VIDEO_TY...
import React from "react" import Layout from "../components/Layout" import SEO from "../components/seo" import Header from "../components/global/header" import { graphql, PageProps } from "gatsby" import ogImage from "../assets/images/seo/granich-indesign.jpg" import ogImageVK from "../assets/images/seo/vk/granich-inde...
import React, { useContext, useState } from 'react'; import StyledReactModal from 'styled-react-modal'; import { Input, message, Form, Select, InputNumber } from 'antd'; import ClipLoader from 'react-spinners/ClipLoader'; import { Title } from '../Typography'; import Button from '../button'; import { ModalContext } fro...
import * as React from 'react'; import * as _ from 'lodash'; import { pluralize } from '@patternfly/react-core'; import { ChartDonut } from '@patternfly/react-charts'; import { ExclamationTriangleIcon } from '@patternfly/react-icons'; import { ResourceHealthHandler } from '@console/plugin-sdk'; import { WatchK8sResults...
import { useEffect, useState, SetStateAction, Dispatch } from "react" import { fetchJson, fetchText } from "./fetch" // eslint-disable-next-line @typescript-eslint/no-explicit-any export type ApiResponseHookResult<TResponseData> = [ { response: TResponseData isLoading: boolean isError: boolean error?...
import * as I from './definitions'; import * as logger from './logger'; import { MediaType, TabLoadOrder, TabLoadType } from './enums'; // Do not introduce settings unless they are used, in order to avoid introducing bad default settings. export const DefaultSiteSettings: I.SiteSettings = { autoFullscreen: false, ...
<reponame>Vibutnum/faasjs import { Command } from 'commander'; import { prompt } from 'enquirer'; import { mkdirSync, writeFileSync, existsSync } from 'fs'; import { join } from 'path'; import { execSync } from 'child_process'; const Provider = ['tencentcloud', null]; const Region = ['ap-beijing', 'ap-shanghai', 'ap-g...
import { Class, PlainObject, Primitive } from './types'; const DOM_PROPERTIES_TO_CHECK: Array<keyof HTMLElement> = [ 'innerHTML', 'ownerDocument', 'style', 'attributes', 'nodeValue', ]; const objectTypes = [ 'Array', 'ArrayBuffer', 'AsyncFunction', 'AsyncGenerator', 'AsyncGeneratorFunction', 'Da...
import React, { useEffect, useState } from "react"; import { mainService } from "../../shared/service/main.service"; import { List, ListItem, createMuiTheme, useMediaQuery, FormControl, Select, MenuItem, } from "@material-ui/core"; import { globalListStyles } from "./global-list.style"; import AppProgress...
import React, { ReactElement, ReactNode, Component, Fragment, RefCallback, isValidElement } from 'react'; import { classNames } from '../../lib/classNames'; import { getClassName } from '../../helpers/getClassName'; import ReactDOM from 'react-dom'; import { canUseDOM, DOMProps, withDOM } from '../../lib/dom'; import {...
import { PeerScoreParams } from './peer-score-params' import { PeerStats } from './peer-stats' type TopicLabel = string type TopicStr = string type TopicStrToLabel = Map<TopicStr, TopicLabel> export type TopicScoreWeights<T> = { p1w: T; p2w: T; p3w: T; p3bw: T; p4w: T } export type ScoreWeights<T> = { byTopic: Map<...
import { GridContainer, Link, Table, Tag } from '@trussworks/react-uswds' import classnames from 'classnames' import dayjs from 'dayjs' import React from 'react' import { NavLink, useLocation } from 'react-router-dom' import { packageName, programNames, } from '../../common-code/healthPlanFormDataType' import {...
<filename>packages/lib/src/weld.ts import { Accessor, Document, Primitive, PrimitiveTarget, Transform, TypedArray } from '@gltf-transform/core'; import { getGLPrimitiveCount } from './utils'; const NAME = 'weld'; export interface WeldOptions {tolerance?: number} const WELD_DEFAULTS: Required<WeldOptions> = {toleranc...
import React from "react"; import { ScreenRecorder, IScreenRecorderOptions, safeCallback } from 'screen-recorder-base'; import bindkey from '@w-xuefeng/bindkey'; import Video from './Video'; export interface IScreenRecorderComponentProps { shortKey?: string; preview?: boolean; videoOptions?: MediaTrackConstraint...
import * as React from 'react'; import { isEqual } from 'lodash'; export interface IDragState { id?: any; x: number; y: number; dropActionId?: number; setDragId?: (id: any, x: number, y: number) => void; setDropActionId?: (id?: number) => void; } const DropContext = React.createContext<IDragSt...
<reponame>robrechtme/next-api-og-image import type { NextApiRequest, NextApiResponse } from 'next' import type { Except, RequireExactlyOne } from 'type-fest' import type { Page, Viewport } from 'puppeteer-core' import type { ReactElement } from 'react' import { renderToStaticMarkup } from 'react-dom/server' import deep...
<filename>src/main/main.ts import { app, BrowserWindow, ipcMain, Menu, MenuItemConstructorOptions, screen, Tray, } from 'electron' import * as Store from 'electron-store' import { activities, ActivityName } from '../config/activities' import { ACTIVITIES_SET, ACTIVITY_RUN, CLOSE_WINDOW, COPY_TO_CL...
<reponame>kevinphelps/angular-cli import { SemVer, satisfies } from 'semver'; import chalk from 'chalk'; import { tags } from '@angular-devkit/core'; import * as path from 'path'; import { isWarningEnabled } from '../utilities/config'; import { requireProjectModule } from '../utilities/require-project-module'; const r...
<gh_stars>100-1000 /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------...
import * as React from 'react'; import styled from '@emotion/styled'; import { colors, commonColors, iconColors, typeColors, spacing, } from '@workday/canvas-kit-react-core'; import type from '@workday/canvas-kit-labs-react-core'; import {CanvasSystemIcon} from '@workday/design-assets-types'; import {SystemIc...
import { call, put, takeLatest, select, delay } from 'redux-saga/effects'; import * as log from '../../utils/electronLogger'; import { getSettingOptionsRequest, getSettingOptionsSuccess, getSettingOptionsFailure, getInitialSettingsRequest, getInitialSettingsSuccess, getInitialSettingsFailure, updateSettin...
import { GESCategory, Ecogeste } from '@/ui/store/modules/ges'; export interface Place { lat: number lng: number } export interface PlaceForm extends Place { name: string placeholder: string } export { GESCategory }; export interface Travel { id: number name: string departure: PlaceForm arrival: Pla...
<gh_stars>1-10 import Vue from 'vue' import { ActionTree, MutationTree, GetterTree } from 'vuex' import { Scholar, ScholarPrivate, ScholarSocialMedia, WWDCYearInfo, WWDCYear, CloudKit } from '@wwdcscholars/cloudkit' function isEmpty(obj: object | undefined): boolean { for (const key in obj) { if (obj...
import firebase from 'firebase/app'; import { motion } from 'framer-motion'; import dynamic from 'next/dynamic'; import Head from 'next/head'; import router from 'next/router'; import React, { useCallback, useEffect, useRef, useState } from 'react'; import styled from 'styled-components'; import TwitterLogoIcon from '...
<gh_stars>0 /** * 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 { CODE_FRAME_CONTEXT_LINES, CODE_FRAME_INDENT, GUTTER, MAX_PATCH_LINES, } from "./constants"; import {showI...
/* eslint-disable import/no-extraneous-dependencies */ import * as fs from 'fs'; import * as path from 'path'; import * as os from 'os'; import { run, spawn, Logger, download, extract, } from './utils'; const solutionFolder = path.join(__dirname, '..'); const nssFolder = path.join(solutionFolder, 'nss'); const opens...
<reponame>vrutkovs/pulumi-gcp // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; import * as utilities from "../utilities"; export class Firewall extends pu...
<filename>packages/browser-installer/src/lib/install/browserFetcher.ts /** * Copyright 2017 Google Inc. All rights reserved. * Modifications copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. *...
<reponame>CompleteControl/pixi-projection import 'pixi.js'; import '../dist/pixi-projection.js'; //@../node_modules/pixi.js/dist/pixi.min.js //@../dist/pixi-projection.js let app = new PIXI.Application(800, 600, {backgroundColor: 0x103322, autoStart: false}); document.body.appendChild(app.view); let loader = new PIX...
<filename>src/tests/integration/index.ts import { wait } from "alcalzone-shared/async"; import * as os from "os"; import * as path from "path"; import { getAdapterName, getAppName } from "../../lib/adapterTools"; import { AdapterSetup } from "./lib/adapterSetup"; import { ControllerSetup } from "./lib/controllerSetup";...
<gh_stars>0 /*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import { strict as assert } from "assert"; import { IContainerLoadMode, LoaderHeader } from "@fluidframework/container-definitions"; import { requestFluidObject } from "@fluidframework/r...
import { flintId } from './flintgg'; export enum twitterMediaType { photo = 'photo', video = 'video', } export enum twitterImageSize { medium = 'medium', thumb = 'thumb', small = 'small', large = 'large', } type twitterImageSizeDetail = { w: number; h: number; resize: string; }; type twitterImage ...
<gh_stars>1-10 import { MachineError, LOCK_VIOLATION, TRANSITION_VIOLATION, INVALID_UNLOCK_KEY, UNREACHABLE_STATE } from './error' import { generateDate, generateId } from './generator' import { log } from './log' export const DELIMITER: string = '>' export const DEFAULT_HANDLER: IHandler = (...last) =...
import colors from '@celo/react-components/styles/colors' import AsyncStorage from '@react-native-community/async-storage' import { DefaultTheme, NavigationContainer, NavigationState } from '@react-navigation/native' import * as React from 'react' import { Share, StyleSheet, View } from 'react-native' import DeviceInfo...
import express from 'express'; import { GraphQLNonNull, GraphQLObjectType, GraphQLString } from 'graphql'; import { GraphQLJSON } from 'graphql-type-json'; import { activities } from '../../../constants'; import { types as CollectiveType } from '../../../constants/collectives'; import { purgeCacheForCollective } from ...
<reponame>yoadsn/cloudinary-js-base import { getUrlPrefix, getUrlVersion, handleAssetType, handleStorageType } from "../internal/url/cloudinaryURL"; import {Transformation} from "../transformation/Transformation"; import ICloudConfig from "../config/interfaces/Config/ICloudConfig"; import IURLConfig from "../co...
<reponame>SocialGouv/code-du-travail-frontend import Engine from "publicodes"; import { mergeModels } from "../../../internal/merger"; import { getReferences } from "../../../utils"; import { DepartRetraiteReferences, MiseRetraiteReferences, } from "../../common/legal-references"; const engine = new Engine(mergeM...
export interface Option { name: string; population: number; capital: string; region: string; } // prettier-ignore export default [ { name: 'Alabama', population: 4780127, capital: 'Montgomery', region: 'South' }, { name: 'Alaska', population: 710249, capital: 'Juneau', region: 'West' }, { name: 'Arizona'...
import { existsSync, readFileSync, writeFileSync } from "fs"; import * as toJsonSchema from 'to-json-schema'; import * as path from "path"; export function generateSwagger(rootPath) { let routeConfig = loadRoutesConfig(rootPath) let swagger = loadSwaggerJson(rootPath); if (routeConfig && swagger) { ...
<filename>plugins/plugin-core-support/src/lib/cmds/tab-management.ts /* * Copyright 2018 The Kubernetes Authors * * 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.or...
<gh_stars>10-100 // This file is adapted from https://github.com/James-Yu/LaTeX-Workshop/blob/master/src/providers/completer/citation.ts // Original license below: //////////////////////////////////////////////////////////////////////////////// // The MIT License (MIT) // // Copyright (c) 2016 <NAME> // // Permission i...
import * as React from "react"; import { Button, ButtonGroup, Divider, Intent } from "@blueprintjs/core"; import { stackApi } from "../../../../api/clients/StackAPI"; import { StackDTO } from "../../../../api/models/StackDTO"; import { showConfirmationDialog } from "../../../confirmation-dialog/showConfirmationDialo...
import {StrictValidator} from "typanion"; import {NoLimits} from "../../core"; import {applyValidator, CommandOptionReturn, GeneralOpti...
<gh_stars>1-10 import {EventEmitter} from '@dekkai/event-emitter/build/lib/EventEmitter'; import {OffscreenBuffer} from '../../renderer/OffscreenBuffer'; import {UXModule} from '../UXModule'; import {App} from 'picogl'; import { MouseCallback, MouseHandler, MouseMoveHandler, MouseState, } from '../mouse...
/* * Copyright (c) 2018 VMware Inc. All Rights Reserved. * SPDX-License-Identifier: 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/LI...
import React from 'react'; import Head from 'next/head'; import Image from 'next/image'; import { useRouter } from 'next/router'; import { AppBar, Button, Card, Fab, Toolbar, Typography, } from '@material-ui/core'; import axios from 'axios'; import Cookies from 'universal-cookie'; import { useQuery } from...
import { NuxtConfig } from '@nuxt/types'; import colors from 'vuetify/lib/util/colors'; import en from './locales/en'; import fr from './locales/fr'; require('events').EventEmitter.defaultMaxListeners = 20; require('dotenv').config(); const proxyHost = process.env.proxyHost || 'http://localhost:8080'; const authHost...
import * as angular from 'angular'; import {AccessControlService} from "../../services/AccessControlService"; import { moduleName } from "./module-name"; import { ListTableView } from "../../services/ListTableViewTypes"; import PaginationData = ListTableView.PaginationData; import SortOption = ListTableView.SortOption;...
<filename>src/SocketIO/SocketIO.ts<gh_stars>0 import * as http from 'http'; import * as socketio from 'socket.io'; import jwt from 'jsonwebtoken'; import logging from '../config/logging'; import config from '../config'; import { addMemberToChat, addMessageToChat, changeChatName, deleteChat, getChat, newChat, rem...
import * as React from 'react'; import { VerticalBarChart, IVerticalBarChartProps, IVerticalBarChartDataPoint } from '@fluentui/react-charting'; import { DefaultPalette } from '@fluentui/react/lib/Styling'; import { IRenderFunction } from '@fluentui/react/lib/Utilities'; import { ChoiceGroup, IChoiceGroupOption } from ...
<filename>src/main.ts import { PassThrough, Readable, Writable } from 'stream'; /** * An error that occurs while sending or receiving messages. */ export type ChromeNativeBridgeError = Error & { type: 'SEND_ERROR' | 'RECEIVE_ERROR'; }; /** * Handle a new message. */ export type OnMessageHandler<T> = (message: T...
<reponame>SpaceK33z/nexus<gh_stars>0 import * as Logger from '@nexus/logger' import * as NexusSchema from '@nexus/schema' import { rootLogger } from '../lib/nexus-logger' import * as Plugin from '../lib/plugin' import { RuntimeContributions } from '../lib/plugin' import * as Reflection from '../lib/reflection/stage' im...
import React from 'react' import { makeStyles } from '@material-ui/core/styles' import IconButton from '@material-ui/core/IconButton' import CloseIcon from '@material-ui/icons/Close' import Typography from '@material-ui/core/Typography' import Paper from '@material-ui/core/Paper' import Table from '@material-ui/core/Ta...
import { useState, useEffect, useRef } from "react"; import { IValueChanged, SharedMap } from "fluid-framework"; import { IGameInfo } from "../interfaces/IGameInfo"; import { AzureClient, AzureMember, IAzureAudience, IUser } from "@fluidframework/azure-client"; import { getConnectionConfig } from "../config"; import {...
<gh_stars>0 import type {Logger} from './logger'; import {resolver} from './resolver'; import {sleep} from './sleep'; export const DEBOUNCE_DELAY_MS = 10; export const MIN_DELAY_MS = 30; export const MAX_DELAY_MS = 60_000; // Max numbers of outstanding connections. This is pretty arbitrary but assuming // a request ...
<reponame>isabella232/tezblock<gh_stars>0 import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges, } from '@angular/core'; import { Store } from '@ngrx/store'; import BigNumber from 'bignumber.js'; import { BehaviorSubject, combineLatest } from 'rxjs'; import { formControlOptions } from '....
import React, { useState } from 'react' import classNames from 'classnames' import { useStaticQuery, graphql } from 'gatsby' import Layout from '../components/layout' import SEO from '../components/seo' import TeamGrid from '../components/team/teamGrid' import data from '../assets/team/team.yaml' import loadable fr...
<filename>src/app/shared/store/news-store/actions.ts import { Post } from '@shared/models'; import { type, ActionWithPayload } from '@shared/utility'; export const ActionTypes = { // News list SORT_ITEMS: type('[News] Sort news'), SORT_ITEMS_SUCCESS: type('[News] Sort news success'...
<gh_stars>10-100 import { coerceBooleanProperty } from '@angular/cdk/coercion'; import { Overlay, OverlayPositionBuilder, OverlayRef } from '@angular/cdk/overlay'; import { ComponentPortal } from '@angular/cdk/portal'; import { ComponentRef, Directive, ElementRef, HostListener, Input, OnDestroy, Renderer2 } f...
import { HIT_POLICY, DecisionTable } from "./DecisionTable"; import * as simple from 'dmn-moddle'; import { ExecuteDecisionTable , ExecuteExpression , ExecuteCondition } from './index'; const fs = require('fs'); const DmnModdle = simple(); //test(); //testDT(); testExprs(); async function testExprs() { const expr...
/** * Adds two numbers. * @customfunction * @param first First number * @param second Second number * @returns The sum of the two numbers. */ /* global clearInterval, console, setInterval */ export function add(first: number, second: number): number { return first + second; } /** * Displays the current time ...
export type GET = "GET"; export type HEAD = "HEAD"; export type POST = "POST"; export type PUT = "PUT"; export type PATCH = "PATCH"; export type DELETE = "DELETE"; export type HTTPMethods = GET | HEAD | POST | PATCH | PUT | DELETE; export type Capture<T extends string, P = string> = P extends string ? (T | string) ...
import * as React from 'react'; import { BrowserRouter as Router, Switch, Route, Link, Redirect, useLocation, useHistory, RouteComponentProps, useRouteMatch } from 'react-router-dom'; import clsx from 'clsx'; import { createStyles, makeStyles, useTheme, Theme } from '@material-ui/cor...
import { IonButton, IonCard, IonCardContent, IonCardHeader, IonCardTitle, IonInput, IonItem, IonLabel, IonList, IonSelect, IonSelectOption, IonToast, } from '@ionic/react'; import React, { useState } from 'react'; import { RouteComponentProps, withRouter } from 'react-router-dom'; import { save...
import React from 'react'; import { useForwardedRef, useRovingTabindex, useSelect, toElements, } from '../../utilities'; import { Option } from './Option'; import { ListboxProps, OptionProps } from './types'; export { ListboxProps } from './types'; /** * A listbox allows the user to select one or more option from a...
<reponame>goldmane/search-ui<gh_stars>0 import { $$, IOffset } from './Dom'; export interface IPosition { vertical: VerticalAlignment; horizontal: HorizontalAlignment; verticalOffset?: number; horizontalOffset?: number; horizontalClip?: boolean; } export enum VerticalAlignment { TOP, MIDDLE, BOTTOM, ...
import { useEffect, useCallback, useRef } from 'react'; import { SimplePosition } from '../types'; import { useAnimationLoop } from './useAnimationLoop'; export type CollapseTransition = 'squashable' | 'shiftable'; export type UsePanelCollapserProps = { disableHiding?: boolean; /** The duration of the animation (...
import React from 'react'; import superagent from 'superagent'; import type { ISong } from '../../providers/Songs.provider'; import type { MusicDashboard } from './index'; import forms from '../../lib/forms'; import SongsTable from './SongsTable'; export class MusicDashboardController { view: MusicDashboard; form...
<reponame>jlmbrt/miss-minutes<filename>src/TimeValue.ts /** * All available Time units */ export type TimeUnits = "h" | "min" | "s" | "ms"; /** * Utils value * bound is the max value (in a 'clock system') * ms_rapport is the divider to use for convert millisecond to the actual unit */ const infos: UnitInfos = { ...
<filename>src/providers/backend/xhr_backend.ts import { Injectable } from '@angular/core'; import { BrowserXhr, Connection, ConnectionBackend, Headers, ReadyState, Request, RequestMethod, Response, ResponseContentType, ResponseOptions, ResponseType, XSRFStrategy } from '@angular/http'; import { ...
<gh_stars>0 /** * Copyright (c) OpenLens Authors. All rights reserved. * Licensed under MIT License. See LICENSE in root directory for more information. */ import type { TypedLocalObjectReference } from "../kube-object"; import { KubeObject } from "../kube-object"; import { autoBind, hasTypedProperty, isString, ite...
<reponame>TheElementAce/typescript-mern-starter import { RequestHandler, Request, Response, NextFunction } from "express"; import { validationErrorResponse } from "./utils"; import { validationResult } from "express-validator"; import PostType from "../../client/core/src/models/PostType"; import ArticleCollection from ...
import { useMemo, useReducer, useEffect } from 'react' import TRACKS from '../data/tracks.json' import { useRemoteConfig } from './useRemoteConfig' /** * Fetches the local track data (like the versioning mapper) * * @param trackId The Track Identifier (slug) */ export function useTrackData(trackId: TrackIdentifie...
import { isString, clone } from 'lodash' import { GraphQLFieldConfig, GraphQLFieldResolver } from "graphql/type/definition"; import { GraphQLOutputType, GraphQLNonNull, GraphQLList } from "graphql"; import { ArgumentBuilder, ArgumentType } from "./argument"; import { ObjectTypeBuilder } from "./objectType"; import Bu...
<reponame>moJiXiang/ngx-tippy-wrapper<gh_stars>10-100 import { isPlatformServer } from '@angular/common'; import { Directive, ElementRef, Inject, Input, OnDestroy, OnInit, PLATFORM_ID, Renderer2, SimpleChange, SimpleChanges } from '@angular/core'; import tippy from 'tippy.js'; import { NgxTippyConte...
<reponame>integreat-io/integreat-adapter-json /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ import debugFn = require('debug') import { Method } from 'got' import { compile as compileUri, generate as generateUri, } from 'great-uri-template' import sendToService from './sendToService' const ...
<reponame>CiscoDevNet/msx-ui-forms // // Copyright (c) 2021 Cisco Systems, Inc and its affiliates // All rights reserved // export interface FieldChange { fieldName: string; value: any; } export interface FormFieldInstance { value: any; type?: string; isValid: boolean; isDirty: boolean; properties?: { [key: str...
<reponame>smartsupp/openapi-client<filename>packages/compiler-typescript/src/compiler.ts import { CompileData, CompiledFile } from '@openapi-client/compiler-types' import * as fs from 'fs' import * as Handlebars from 'handlebars' import { pascalCase } from 'pascal-case' import prettier from 'prettier' import helpers fr...
<gh_stars>1-10 import nunjucks from "nunjucks"; import { useRecoilCallback } from "recoil"; import bloqTypes from "../config/bloqs.yml"; import boards from "../config/boards.yml"; import components from "../config/components.yml"; import { selectedCodeStartToken, selectedCodeEndToken } from "./config"; import { IBoar...
<reponame>pfgithub/advent-of-code-2019 /* input: string, lines: string[], dblines: string[][] copy(text: string) → clipboard error(message: string) → thrown error -5..mod(3) → @mod(-5, 3) */ // Cardinals: // [[1,0],[-1,0],[0,1],[0,-1]] // +Diagonals: // [[1,0],[-1,0],[0,1],[0,-1],[-1,-1],[-1,1],[1,-1],[1,1]] export {...