blob_id large_stringlengths 40 40 | language large_stringclasses 1
value | repo_name large_stringlengths 5 119 | path large_stringlengths 4 271 | score float64 2.52 4.84 | int_score int64 3 5 | text stringlengths 26 4.09M |
|---|---|---|---|---|---|---|
496800c63b0a4c44b09c138ea40b33ea1c8f07ab | TypeScript | taenito/jway-tools | /src/models/cor/DoctypeCor.ts | 2.625 | 3 | import { Document } from "../Document";
import { DoctypeNode } from "../nodes/DoctypeNode";
import { ACor } from "./ACor";
export class DoctypeCor extends ACor {
addNode(doc: Document, s: string): boolean {
let node: DoctypeNode = new DoctypeNode(doc.current);
node.value = s;
do... |
d64f0a56829bae6d637b3d3f100cebc28a7b7309 | TypeScript | awave1/cursor | /src/styles/theme.ts | 2.640625 | 3 | import { FontTheme, fontsLightTheme, fontsDarkTheme } from './fonts'
import { ColorTheme, colorLightTheme, colorDarkTheme } from './color'
export interface Theme {
readonly type: 'light' | 'dark'
readonly font: FontTheme
readonly colors: ColorTheme
}
export const lightTheme: Theme = {
type: 'light',
font: f... |
4d8828e035ad33633f6ce6449c454a1d5d80bd2e | TypeScript | koen-serneels/knooppuntnet | /client/src/app/kpn/shared/node-integrity-check.ts | 2.578125 | 3 | // this class is generated, please do not modify
export class NodeIntegrityCheck {
constructor(readonly nodeName: string,
readonly nodeId: number,
readonly actual: number,
readonly expected: number,
readonly failed: boolean) {
}
public static fromJSON(jso... |
5e79e5b487ec8f3607d379c51c27e63c35aad441 | TypeScript | Ethicoders/gcms-backend | /src/utils/json.ts | 2.6875 | 3 | import * as path from 'path';
import { writeFile, readFile } from '@/async/fs';
export default class {
private path;
public constructor(filePath: string) {
this.path = path.normalize(filePath)
}
public async read() {
return JSON.parse(await readFile(this.path));
}
public write(... |
0e76bfac59c19229bed5ffe0f7c7a06c48526f92 | TypeScript | maxshymchuk/UnoRetranslator | /src/transliteration.ts | 2.984375 | 3 | function getAssociation(char: string) {
const upCaseChar = char.toUpperCase();
const isUpperCase = upCaseChar == char;
switch (upCaseChar) {
case 'А': return isUpperCase ? 'A' : 'a';
case 'Б': return isUpperCase ? 'B' : 'b';
case 'В': return isUpperCase ? 'V' : 'v';
case 'Г': return isUpperCase ? ... |
6526c444728808f2bdfc2933aad068942e6e80cf | TypeScript | Skp80/Verdant | /verdant/verdant-model/history/store/node-history.ts | 2.90625 | 3 | import { Nodey } from "../../nodey";
import { OriginPointer } from "./origin-pointer";
import { log } from "../../notebook";
const DEBUG = false;
/*
* Just a container for a list of nodey versions
*/
export class NodeHistory<T extends Nodey> {
originPointer: OriginPointer | null = null;
protected versions: T[] ... |
e8d6c0fc49334035f7609c1510ec49639fce6f19 | TypeScript | Aleix1379/click-counter-web | /src/app/services/local-storage/local-storage.service.ts | 2.90625 | 3 | import {Injectable} from '@angular/core';
import {Token} from '../../interfaces/token';
@Injectable({
providedIn: 'root'
})
export class LocalStorageService {
/**
* value = storage[key]
*/
private static getItem<T>(key: string): T {
const item = localStorage.getItem(key);
if (item) {
return ... |
a87dc965dc07c4662048b97cda10cfccc87f4324 | TypeScript | funya/zerro | /src/helpers/useSearchParam.ts | 2.640625 | 3 | import { useCallback } from 'react'
import { useHistory, useLocation } from 'react-router'
function getModifiedPath(key: string, value?: string | null) {
const url = new URL(window.location.href)
url.searchParams.delete(key)
if (value) url.searchParams.append(key, value)
const path = url.pathname + url.search
... |
6745b611f123cbc9563f8b5379b2fff53c2dc8df | TypeScript | artronics/pepper-graphics | /src/graphics/measure/Transformation.ts | 3.015625 | 3 | import { Coordinate } from './Rect';
export type Transformation = [
[number, number, number],
[number, number, number],
[0, 0, 1]
];
const unit = (): Transformation => [
[1, 0, 0],
[0, 1, 0],
[0, 0, 1],
];
export const move = ([x, y]: Coordinate, transformation?: Transformation): Transformation => {
co... |
29d8dd60e7a80c7ab0da3415c29b6c1271f2334f | TypeScript | PatrickRose/advent-of-code | /typescript/src/2020/11_SeatingSystem.ts | 3.53125 | 4 | import getInput from "./util/getInput";
const input = getInput(11)
type Position = {
newPosition: (numAdjacent: number, partTwo: boolean) => Position,
toString: () => string,
}
const floor: Position = {
newPosition: () => floor,
toString: () => '.',
};
const occupied: Position = {
newPosition(nu... |
e34cad39cd2649fd23951f755c34032bafd36fa0 | TypeScript | mohankumart/typescript | /interfaces/app-functions.ts | 3.40625 | 3 | interface DoubleValueFunc {
(number1: number, number2: number): number;
}
let myDoubleFunction: DoubleValueFunc;
myDoubleFunction = function(value1: number, value2: number){
return (value1 + value2) * 2;
}
console.log(myDoubleFunction(10, 20));
|
56f3e9d52a03f30e881fea6bcfe9c3290cb38a3d | TypeScript | ArkEcosystem/core | /packages/core-kernel/src/services/attributes/attribute-map.ts | 2.96875 | 3 | import { get, has, set, unset, cloneDeep } from "@arkecosystem/utils";
import { strictEqual } from "assert";
import { assert } from "../../utils";
import { AttributeSet } from "./attribute-set";
export class AttributeMap {
/**
* @private
* @type {object}
* @memberof AttributeMap
*/
private... |
61f40b57d65f06c7b50ed5cff65a4b8357349b4a | TypeScript | bhuvinth/travel-aggregator | /src/core/applicationService/flightService.spec.ts | 2.625 | 3 | import FlightSourceApiAdapter, {
flights,
flights as flightsMockData,
} from './mocks/flightSourceApiAdapter.mock';
import FlightSourceApiFailAdapter from './mocks/flightSourceApiAdapter.fail.mock';
import FlightService from './flightService';
describe('Test Flight Service for unique flight data being returned', (... |
74e7612899ea2b1608dc406a8621888202e1241d | TypeScript | AndonMitev/Work | /work/src/app/store/reducers/user.reducers.ts | 2.921875 | 3 | import * as UserActions from '../actions/user.actions';
import { UserState } from '../state/user.state';
const INITIAL_STATE: UserState = {
userState: null,
};
function sendUserValueToService (state, userInputValue) {
state.inputValue = userInputValue;
return state;
}
function loadUser(state: UserState, payloa... |
f6b05d972cfaf6a89a7bbdf2336ae0d08364c668 | TypeScript | andrerpena/chatjs | /ChatJs/js/jquery.chatjs.friendswindow.ts | 2.828125 | 3 | /// <reference path="../../Scripts/Typings/jquery/jquery.d.ts"/>
/// <reference path="jquery.chatjs.interfaces.ts"/>
/// <reference path="jquery.chatjs.adapter.ts"/>
/// <reference path="jquery.chatjs.utils.ts"/>
/// <reference path="jquery.chatjs.window.ts"/>
/// <reference path="jquery.chatjs.userlist.ts"/>
interfa... |
ce0966ba0b4719d265dd0af6665d3746096a88b5 | TypeScript | patriciasfabbri/MinervaCNH | /src/util/roulette.ts | 2.734375 | 3 | export class Roulette {
computVisionSubs(req: any, callBack: Function) {
if (!global.computVisionCalls || global.computVisionCalls == null) {
global.computVisionCalls = 0;
}
if (global.computVisionCalls >= 74) {
global.computVisionCalls = 0;
}
... |
6e7a376803d9ae681baa9faff484bcabd6faf463 | TypeScript | charleslana/nestjs | /src/courses/courses.service_backup.ts | 2.890625 | 3 | import {HttpException, HttpStatus, Injectable} from '@nestjs/common';
import {Course} from './entities/course.entity';
@Injectable()
export class CoursesService {
private courses: Course[] = [
{
id: 1,
name: 'Course NestJs',
description: 'Course NestJs description',
... |
909a6d90538c477867872f4ce959035c29d07f5a | TypeScript | rodzewich/playground | /lib/compiler/compiler.ts | 2.75 | 3 | /// <reference path="../../types/node/node.d.ts" />
import {isDefined} from "../utils/common";
import {IException as IExceptionBase} from "../exception";
import {IException} from "./exception";
import {ICssErrorsHelper, CssErrorsHelper} from "./helpers/cssErrorsHelper";
import {IWebRootDirectoryHelper, WebRootDirector... |
1201da7bdf5e23cac036285988e30745013c70ad | TypeScript | simplegis/sakura-node-ts | /src/test/sqlquery/testupdatequery_stock_issue.ts | 2.5625 | 3 | // Copyright 2016 Frank Lin (lin.xiaoe.f@gmail.com). All rights reserved.
// Use of this source code is governed a license that can be found in the LICENSE file.
import * as chai from "chai";
import {TableName, Column} from "../../base/decorator";
import {Model, SqlType, SqlFlag} from "../../base/model";
import {Upda... |
a237abc990e2f58ec9f2870c16bd4be8e20db592 | TypeScript | clementFrade/OnTientLeBonBout2 | /OnTientLeBonBout/src/main/webapp/app/shared/model/media.model.ts | 2.71875 | 3 | export interface IMedia {
id?: number;
adresse?: string;
type?: string;
nom?: string;
}
export class Media implements IMedia {
constructor(public id?: number, public adresse?: string, public type?: string, public nom?: string) {}
}
|
698fbee86f8d0e4302772ca637e1d168620cb42b | TypeScript | PluginSystem-StudyManager/Server | /src/homepage/home.ts | 2.828125 | 3 | let slideIndex = 1;
showSlides(slideIndex);
// Next/previous controls
function plusSlides(n) {
showSlides(slideIndex += n);
}
// Thumbnail image controls
function currentSlide(n) {
showSlides(slideIndex = n);
}
function showSlides(n) {
let i;
let slides = <HTMLCollectionOf<HTMLDivElement>>document.ge... |
f5b145071f0123f8ac954cacf6e9c4f9e093d6da | TypeScript | huaweicloud/huaweicloud-sdk-nodejs-v3 | /services/ces/v2/model/ListAlarmHistoriesRequest.ts | 2.59375 | 3 |
export class ListAlarmHistoriesRequest {
private 'alarm_id'?: string;
public name?: string;
public status?: string;
public level?: number;
public namespace?: string;
private 'resource_id'?: string;
public from?: string;
public to?: string;
public offset?: number;
public limit?:... |
c7b2cedb21d81c7ec20a1c4bd24c3084949d3760 | TypeScript | TaHuuCong/nash-training | /src/app/hero-thc/super-hero-list-in-star-war/super-hero-list-in-star-war.component.ts | 2.546875 | 3 | import { Component, OnInit, ViewEncapsulation, ElementRef, ViewChild } from '@angular/core';
import { SuperHero } from './superhero';
@Component({
selector: 'thc-super-hero-list-in-star-war',
templateUrl: './super-hero-list-in-star-war.component.html',
styleUrls: ['./super-hero-list-in-star-war.component.css'],
... |
87935d97ff5efd76caf304b9285e895f3e352a8b | TypeScript | zavarock/gostack-desafio-database-upload | /src/config/upload.ts | 2.515625 | 3 | import { Request } from 'express';
import path from 'path';
import crypto from 'crypto';
import multer, { FileFilterCallback } from 'multer';
const uploadPath = path.resolve(__dirname, '..', '..', 'tmp');
const uploadFilter = (
request: Request,
file: Express.Multer.File,
callback: FileFilterCallback,
): void =>... |
ce7b89c26396f2d2de15bad9447b6bd7238be511 | TypeScript | HemSoft/ESO | /HemSoft.Eso.Web/app/characters/characterInventoryController.ts | 2.59375 | 3 | module App.CharacterInventoryController {
interface ICharacterInventoryiewModel {
title: string;
characters: App.Domain.ICharacter[];
// TODO:
inventory: any[];
dataAccessService: App.Common.DataAccessService;
inventorySortType: string;
inventorySortReverse:... |
b11dd5e56ae304762ac4571880aa7deb75e09665 | TypeScript | filefoxper/generator-dc | /app/templates/web-pc-simple/src/utils/cookie/index.ts | 2.8125 | 3 | export const getCookie = (key: string) => {
const reg = new RegExp(`(^| )${encodeURIComponent(key)}=([^;]*)(;|$)`);
const arr: RegExpMatchArray | null = window.document.cookie.match(reg);
if (arr) {
return decodeURIComponent(arr[2]);
}
};
export const deleteCookie = (key: string, path = '/') => {
const v... |
103bd6442800fb55a990515e4010687b9379f564 | TypeScript | AndyDecker/fhir-ts | /packages/fhir-types/src/R4/Resource.ts | 2.625 | 3 | /**
* Resource Module
*/
import * as primitives from "@tangdrew/primitives";
import * as t from "io-ts";
import { Element } from "./Element";
import { Meta } from "./Meta";
/**
* Base Resource
*/
export interface Resource {
/** The type of resource */
resourceType?: "Resource";
/** Logical id of this artifa... |
aeb4f689149f7a85692dc5568cdf59d2e4dd0502 | TypeScript | zylozs/NyxBotJs | /src/utils/typeutils.ts | 3.375 | 3 | import { DiscordRole, DiscordGuild, DiscordSnowflake, DiscordGuildMember, Collection } from "../discord/discordtypes";
export class TypeUtils
{
public static ToBool(value:any):boolean | null
{
if (typeof(value) == 'boolean')
{
return <boolean>value;
}
else if (typeof... |
c8752518de953e64998a3bb997e3d0c9a1820cad | TypeScript | material-theme/vsc-material-theme | /src/webviews/ui/release-notes/index.ts | 2.578125 | 3 | import sanityClient from '@sanity/client';
import {IPost, IPostNormalized} from '../../interfaces';
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
const getClient = () => sanityClient({
projectId: 'v475t82f',
dataset: 'production'
});
const getReleaseNotes = async (): Promise<object... |
bccbcdba6493d641bfbe2e9f5fb9f33bc0385f82 | TypeScript | cellbang/malagu | /dev-packages/testing/src/await-url.ts | 2.65625 | 3 | import axios from 'axios';
export function awaitUrl(url: string, tries = 150, interval = 1000) {
return new Promise<void>((resolve, reject) => {
const attempt = async (count: number) => {
try {
await axios.head(url, {
timeout: 10000
});
... |
e096ca133f644002d83e7924bec5c4bb4801da33 | TypeScript | webdevavi/twitter-clone-backend | /src/utils/getHashtags.ts | 2.703125 | 3 | import { hashtags as hashtagRegex } from "./regexp";
export const getHashtags = (text: string, prefix: boolean = true): string[] => {
const hashtags = new Set<string>();
const matches = [...text.matchAll(hashtagRegex)].map((match) => match[0]);
matches.map((match) => {
if (prefix) {
return hashtags.add... |
823accc198fc48fa0d1d7fdbf34b3252925fd9ea | TypeScript | untlsn-old/fylo-data | /src/hooks/useBoolState.ts | 3.109375 | 3 | import {useState} from 'react';
type useBoolResult<T> = [
T,
(force?: boolean) => void
]
const useBoolState = (initialState?: boolean): useBoolResult<boolean> => {
const [value, changeValue] = useState(initialState == true);
return [
value,
(force) => changeValue(old => force ?? !old)
];
};
useBoolSt... |
f109abacd0a78c26161ef9837eaf497625759e73 | TypeScript | Roms1383/definitive-guide-nestjs-guard-passport | /src/hit.service.ts | 2.6875 | 3 | import { Injectable } from '@nestjs/common'
import { Hit } from './hit.entity'
@Injectable()
export class HitService {
private hits: Hit[] = []
record(ip: string, timestamp: number) {
const index = this.hits.findIndex(access => access.ip === ip)
if (index !== -1) this.hits[index].timestamp = timestamp
... |
84b7fdd4a39ba0e3240abab6dd0321dbc0dd520b | TypeScript | syuilo/misskey-file | /src/utils/cli/progressbar.ts | 3.25 | 3 | import * as ev from 'events';
import * as readline from 'readline';
import * as chalk from 'chalk';
/**
* Progress bar
*/
class ProgressBar extends ev.EventEmitter {
public max: number;
public value: number;
public text: string;
private indicator: number;
constructor(max: number, text: string = null) {
super... |
bff4c09239832eea74a1f255982eaad260ccad27 | TypeScript | pedrofrohmut/todos-nextjs | /server/use-cases/users/implementations/create-user.use-case.ts | 2.65625 | 3 | import ICreateUserService from "../../../services/users/create-user-service.interface"
import IFindUserByEmailService from "../../../services/users/find-user-by-email-service.interface"
import ICreateUserUseCase from "../create-user-use-case.interface"
import { CreateUserType } from "../../../types/user.types"
import... |
b40f7907e367a7194fc0a1d0d7b180e1757ba213 | TypeScript | fortSQ/web-console | /src/TypeScript/CityList.ts | 3.296875 | 3 | interface ICityList {
list: {}
nameList: {}
transfer(idList: number[], typeTo: string): void
}
class CityList implements ICityList {
static ACTIVE = 'active'
static INACTIVE = 'inactive'
static VORONEZH = 36
static UKHTA = 11
static MOSCOW = 77
static SAINT_PETERSBURG = 78
pub... |
9afebe5d8274970f82f7201f8a1f98bfa6fde98d | TypeScript | mustafapc19/deno | /std/jwt/test.ts | 2.921875 | 3 | import { create, decode, Header, Payload, verify } from "./mod.ts";
import {
assertEquals,
assertThrows,
assertThrowsAsync,
} from "../testing/asserts.ts";
const header: Header = {
alg: "HS256",
typ: "JWT",
};
const payload: Payload = {
name: "John Doe",
};
const key = "secret";
Deno.test({
name: "[j... |
eec63fad54e184afd7b8ebd375aded0660437816 | TypeScript | Varmaji/NodeJs | /TSExample.ts | 3.78125 | 4 | let num:number;//[optional initial value]
num=10;
console.log(num);
function show():void{
console.log('show() called');
return;
}
show();
function fnWithArgs(id:number,name:string):string{
return `ID:${id},Name:${name}`;
}
console.log(fnWithArgs(10,'Canarys'));
let arr=new Array(10);
arr[11]='welcome'
c... |
a04907a71032ed923d98d07e9a4aab93cb748058 | TypeScript | joehakimrahme/JSR | /src/app/roulette/roulette.component.ts | 2.515625 | 3 | import { Component, OnInit } from '@angular/core';
import { Roulette } from '../roulette';
import { RACES, FIGHT_SKILLS, NEUTRAL_SKILLS, TRADE_SKILLS, HANDICAPS, QUESTS, CONDITIONS } from '../fixtures';
import { choice, shuffle} from '../utils';
@Component({
selector: 'app-roulette',
templateUrl: './roulette... |
58cb3ced934f6a4934a17d65323da9d1c852884f | TypeScript | schneider-simon/questionnaire-dsl | /src/form/form_errors.ts | 3.0625 | 3 | import { getTypeString } from "./type_checking/type_assertions";
import { FieldType } from "./FieldType";
import FieldNode from "./nodes/fields/FieldNode";
import Expression from "./nodes/expressions/Expression";
export class FormError extends Error {
constructor(m: string) {
super(m);
Object.setPrototypeOf(... |
caf3f5df0fa1b25aea2a5c15da536efcb0affeed | TypeScript | charlesr1971/blog-cms-2 | /src/app/util/updateCdkOverlayThemeClass.ts | 2.578125 | 3 | export function updateCdkOverlayThemeClass(className1: string, className2: string): void {
const debug = false;
const cdkoverlaycontainerArray = Array.prototype.slice.call(document.querySelectorAll('.cdk-overlay-container'));
if(Array.isArray(cdkoverlaycontainerArray) && cdkoverlaycontainerArray.length) {
... |
35cde1a1d4943627a4bf5d51124502ac7c1574af | TypeScript | FCLans/new_social_network | /src/redux/profileReducer.test.ts | 2.96875 | 3 | import { PostDataType, ProfileInfoType } from '../types/types'
import profileReducer, { addPostActionCreator, deletePostAC } from './profileReducer'
const initialState = {
profileInfo: null as ProfileInfoType,
postsData: [
{ id: 1, message: 'Привет, мой первый пост!', likesCount: 120 },
{ id: 2, message: '... |
f31ff54dbf8308ae3438cdc766f5a260e1d1dc1d | TypeScript | Stepan-Demchenko/questionnaire | /src/app/shared/select/select/select.component.ts | 2.59375 | 3 | import { Component, ChangeDetectionStrategy, forwardRef, Input } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
export interface SelectOption {
title: string;
value: string | number;
}
@Component({
selector: 'app-select',
templateUrl: './select.component.html',... |
8f35c7b009d5efbda68f5899b30aa71c09b2f507 | TypeScript | MunifTanjim/node-bitbucket | /src/plugins/pagination/get-page.ts | 2.578125 | 3 | import { HTTPError } from '../../error'
type APIClient = import('./types').APIClient
type Direction = import('./types').Direction
type PaginatedResponseData<T> = import('./types').PaginatedResponseData<T>
type Response<T> = import('./types').Response<T>
export function getPage<T>(
client: APIClient,
direction: Di... |
10e7f68b167aa399b26dd2d7c3e22e3739c8a5a7 | TypeScript | DefinitelyTyped/DefinitelyTyped | /types/fbjs/lib/Heap.d.ts | 2.921875 | 3 | declare class Heap {
constructor(items?: any[], comparator?: (a: any, b: any) => boolean);
empty(): boolean;
pop(): any;
push(item: any): void;
size(): number;
peek(): any;
_heapify(): void;
_bubbleUp(index: number): void;
_sinkDown(index: number): void;
}
declare namespace Heap {... |
a965d5b5b28a470093d7241e9fad9f20e2d7c1d0 | TypeScript | harpreet-singh-au7/bootcamp | /Backend/db/Database/sqlConnector.ts | 2.671875 | 3 | import mysql from 'mysql';
export var pool = mysql.createPool({
host: process.env.SQLDATABASEHOST,
user: process.env.SQLDATABASEUSER,
password: process.env.SQLDATABASEPASSWORD,
database: process.env.SQLDATABASENAME,
connectionLimit: 500,
queueLimit: 0,
waitForConnections: true,
});
export... |
9a9db36aaeb3eb40115294d714da8ce612edf3c6 | TypeScript | Airwarfare/cap | /lib/Network/Link/Link.ts | 2.640625 | 3 | export interface Link {
offset: number;
type: number;
parse(buffer: Buffer): Link;
}
|
dbd657c3da3c20610a96d0cfb718aa73a7cfe9cb | TypeScript | manuth/dataskop-electron | /src/providers/youtube/utils.ts | 2.609375 | 3 | import _ from 'lodash';
import { Lookup, ScrapingResultSaved } from '../../db';
const getThumbnails = (id: string) => {
/**
* Returns all thumbnails to given YT video it.
https://yt-thumb.canbeuseful.com/en
*/
// the first image is the `default` image.
const small = [1, 2, 3].map(
(x) => `https://... |
d33a723ab36089f530b746402e7eec568f251cf2 | TypeScript | Duru23/vscode-versionlens | /src/infrastructure.providers/dotnet/src/options/nugetOptions.ts | 2.625 | 3 | import { IFrozenRepository } from 'core.generics';
import { Options } from 'core.configuration';
enum NugetContributions {
Sources = 'sources',
}
export class NugetOptions extends Options {
constructor(config: IFrozenRepository, section: string) {
super(config, section);
}
get sources(): Array<string> {... |
e0d16d88b1785ccbfbdde74e8af2f132221015ce | TypeScript | Neone-character-creator/only-war-plugin | /src/main/resources/js/app/finalize/FinalizePageController.ts | 2.53125 | 3 | import {Characteristic} from "../types/character/Characteristic";
import {
CharacteristicAdvancement, SkillAdvancement,
TalentAdvancement, PsychicPowerAdvancement
} from "../types/character/advancements/CharacterAdvancement";
import {Aptitudes} from "../types/character/Aptitudes";
/**
* Created by Damien on 7/... |
30732054a2f7dba0e6742a9903a713e97b6dc86d | TypeScript | wardenfeng/feng3d-AsToTs | /src/me/feng3d/fagal/params/ShaderParams.ts | 2.546875 | 3 | module feng3d {
/**
* 渲染参数
* <p>? 是否需要限定组件为ShaderParamsComponent</p>
* @author feng 2014-11-4
*/
export class ShaderParams extends Component {
/** 取样标记字典 */
private sampleFlagsDic;
/** 是否使用贴图分层细化 */
public useMipmapping: boolean;
/** 是否使用平滑纹理 */
publi... |
2790b0213a05731d46c7634901e8688911296f8f | TypeScript | green-fox-academy/vis0rka | /week-04/day-1/write-single-line/write-single-line.ts | 3.109375 | 3 | import { fileURLToPath } from "url";
'use strict';
export { };
// Open a file called 'my-file.txt'
// Write your name in it as a single line
// If the program is unable to write the file,
// then it should print an error message like: 'Unable to write file: my-file.txt'
const fs = require('fs');
function appendTofi... |
b221d07f92d99e2e27496e7852128cd3a5a78039 | TypeScript | swc-project/swc | /crates/swc_ecma_parser/tests/tsc/objectLiteralNormalization.ts | 3.828125 | 4 | // @strict: true
// @declaration: true
// Object literals in unions are normalized upon widening
let a1 = [{ a: 0 }, { a: 1, b: "x" }, { a: 2, b: "y", c: true }][0];
a1.a; // number
a1.b; // string | undefined
a1.c; // boolean | undefined
a1 = { a: 1 };
a1 = { a: 0, b: 0 }; // Error
a1 = { b: "y" }; // Error
a1 =... |
9c8bbc7792d94bee283e147f94d93193be3f3439 | TypeScript | ForNeVeR/vscode-rewrap | /src/DocumentTypes.ts | 2.859375 | 3 | import { TextDocument } from 'vscode'
import { extname } from 'path'
import DocumentProcessor from './DocumentProcessor'
import Standard from './Parsers/Standard'
import LaTeX from './Parsers/LaTeX'
import Markdown from './Parsers/Markdown'
import Xml from './Parsers/Xml'
export { fromDocument, fromLanguage, fromExte... |
2e16b71f53e6420477806b0714179f065c4e1110 | TypeScript | HOI4-Modding-Tools/hoi4-file-parsers | /src/start.ts | 2.625 | 3 | import * as yargs from "yargs";
import * as process from "process";
import * as fs from "fs";
import * as path from "path";
import * as util from "util";
import * as os from "os";
import * as chokidar from "chokidar";
import ModDescriptorReader from "./parsers/ModDescriptorReader";
const args = yargs.argv;
console.l... |
a9ede489c2bac5f1f1776fad8acc361ad3d8937a | TypeScript | danielisaacgeslin/reservations-offices | /app/filters/repeatObjectToArray.filter.ts | 2.625 | 3 | (() => {
'use strict';
angular.module('app').filter('repeatObjectToArrayFilter', repeatObjectToArrayFilter);
function repeatObjectToArrayFilter(): Function {
function orderThis(a: any, b: any, orderKey: string): number {
var aValue = a[orderKey];
var bValue = b[orderKey];
... |
81fa5fc2a534c9f442014270e6fe622e9b09f202 | TypeScript | mosqlee/ts-lodash | /src/array/dropRight/dropRight.test.ts | 3.796875 | 4 | /**
* Given an array of items
* and a number of items to drop (defaults to 1)
* it should return a new array with items dropped from the end of the array
*/
import { dropRight as dRight } from 'lodash'
import dropRight from './dropRight'
describe('#dropRight', () => {
it('should return an array', () => {
e... |
9c0ba82d5137f2121b45d99b584a60891139839d | TypeScript | quangbestdev/uniforms | /packages/uniforms-bridge-graphql/src/GraphQLBridge.ts | 2.65625 | 3 | import * as graphql from 'graphql/type/definition';
import invariant from 'invariant';
import lowerCase from 'lodash/lowerCase';
import memoize from 'lodash/memoize';
import upperFirst from 'lodash/upperFirst';
import { Bridge, joinName } from 'uniforms';
function extractValue(x: boolean | null | string | undefined, y... |
6fe1b9ebeddfcc24d6bfd506aac29da9c9a5d365 | TypeScript | ksc-fe/kpc | /components/slider/useValue.ts | 2.71875 | 3 | import {useInstance} from 'intact';
import type {Slider} from './';
import {useReceive} from '../../hooks/useReceive';
import {NormalizedGetStep} from '../spinner/useStep';
import {minMaxStep} from '../spinner/useValue';
import {error} from 'intact-shared';
import {isEqualArray} from '../utils';
import {useState} from ... |
671fe3320537be9e0520781c17912be2ad15f685 | TypeScript | seektor/Canvas_renderer | /src/app/components/ConfigSection/ConfigSection.ts | 2.734375 | 3 | import { Utils } from '../../utils/Utils';
import { Switch } from '../Switch/Switch';
import ConfigSectionAttributeHooks from './structures/ConfigSectionAttributeHooks';
import ConfigSectionClassHooks from './structures/ConfigSectionClassHooks';
export class ConfigSection {
private componentElement: HTMLElement;
... |
a6b7507c2357c8371d573825e01136b3b0b540e1 | TypeScript | siongesteban/crwn-clothing-client | /src/reducers/sample.reducer.ts | 3.03125 | 3 | import { SampleState, Action, ActionType } from 'types';
const INITIAL_STATE: SampleState = {
name: 'John',
age: 99,
job: {
title: 'Developer',
description: 'React Developer',
},
};
export const sampleReducer = (
state: SampleState = INITIAL_STATE,
action: Action,
): SampleState => {
switch (act... |
b4c4128c326bff2d3f048438893751df61215980 | TypeScript | jeremy-coleman/esbuild-vs-omnify-r3f | /tools/omnify/bundler/deps-sort.ts | 2.546875 | 3 | import { Transform } from "stream"
import { shasum } from "./shasum"
type DepsSortOptions = {
expose?: {} | []
dedupe?: any
index?: any
}
export function depsSort(opts: { expose?: {} | []; dedupe?: any; index?: any }) {
if (!opts) opts = {}
var rows = []
return new Transform({
objectMode: true,
w... |
eb6fe3c5c599fa7c0d2afef59b5881c7c74102c1 | TypeScript | Qdigital/expo | /packages/expo-network/src/Network.types.ts | 2.609375 | 3 | export type NetworkState = {
type?: NetworkStateType;
isConnected?: boolean;
isInternetReachable?: boolean;
};
export enum NetworkStateType {
NONE = 'NONE',
UNKNOWN = 'UNKNOWN',
CELLULAR = 'CELLULAR',
WIFI = 'WIFI',
BLUETOOTH = 'BLUETOOTH',
ETHERNET = 'ETHERNET',
WIMAX = 'WIMAX',
VPN = 'VPN',
O... |
da628a3b90c7a1f72d1e7424bdef65361d99db29 | TypeScript | ojkelly/wahn | /src/index.ts | 2.6875 | 3 | import * as mm from "micromatch";
import * as debug from "debug";
import { AuthorizationDeniedError } from "./errors";
import { evaluateAccess, matchPolicies } from "./evaluate";
const info: debug.IDebugger = debug("wahn:info");
const log: debug.IDebugger = debug("wahn:log");
const warn: debug.IDebugger = debug("wahn... |
5d28526eaca968760db85bda7259e06a21be4faf | TypeScript | joseavilees/SCode | /1. Presentation/SCode.Client.Student.WebApp/SCode.Client.Student.WebApp/ClientApp/src/app/application/helpers/MonacoHelper.ts | 2.796875 | 3 | import { StringHelper } from "./StringHelper";
export class MonacoHelper {
static getLanguageByFileName(fileName: string) {
const extension = StringHelper
.getFileNameExtension(fileName);
switch (extension) {
case "js":
case "mjs":
return "javascript";
case "ts":
re... |
28129783bf7a62334c423c9b2785afc5d29c756a | TypeScript | optics-team/hal-client | /src/fetchAll.ts | 2.796875 | 3 | import { Resource } from './Resource';
import { Link } from './Link';
export interface Options {
embed: string;
params?: {};
progress?: (total: number, complete: number) => void;
}
export const fetchAll = async<T extends Resource>(link: Link, { embed, params, progress }: Options) => {
let items: T[] = [];
... |
cdd9d181883f3b51b3829a7b42a17934be9d51a1 | TypeScript | GavinHe322/learning | /design/18-接口和面向接口编程/21.5.ts | 2.71875 | 3 | interface Command {
execute: Function
}
const log: Function = console.log
class RefreshMenuBarCommand implements Command {
constructor() {}
execute() {
log('刷新菜单界面')
}
}
class AddSubMenuCommand implements Command {
constructor() {}
execute() {
log('添加子菜单')
}
}
var refreshMenuBarCommand: Refres... |
52d9f164fbd18a4dbc30e1e5194f69bff5ad2124 | TypeScript | breck7/virtual-unfolding | /src/common/MutableTypedArray.ts | 3.546875 | 4 | import { readBin, getBinUseNull, getBinNumElements, writeBin, writeBinHeader, readDataAsType } from './io';
import { isPositiveInteger, typeOfTypedArray, isNonNegativeInteger, nullValForType, isArray, dataSizeForType } from './utils';
import { Vector3, Vector2 } from 'three';
import { Type, TypedArray } from './types';... |
7bbc703fe980916023ad4b134079a3cf0489484c | TypeScript | kristianmandrup/js-ts-language-implementation-patterns | /ts-src/interpreter/tree/TokenStream.ts | 2.53125 | 3 | export class TokenStream {
toString(startIndex: number, stopIndex: number): string {
return "";
}
}
|
e14c0c49d60001a7ac5443753a8ab39a0b14b871 | TypeScript | checkupjs/checkup | /packages/core/src/data/formatters.ts | 2.828125 | 3 | export function toPercent(numeratorOrValue: number, denominator?: number): string {
let value: number =
typeof denominator === 'number' ? numeratorOrValue / denominator : numeratorOrValue;
return `${(value * 100).toFixed(0)}%`;
}
|
d6716bfcfa808ecb1910859324f8d489ca309110 | TypeScript | dretechtips/librecommerce-server | /src/app/api/sale/shipping/Shipping.interface.ts | 2.734375 | 3 | import AddressSchema from "src/app/common/model/schema/Address.schema";
import CostSchema from "../../billing/cost/Cost.schema";
import { Transactable } from "../../billing/transaction/Transaction.interface";
import { PackageDOT } from "./package/Package.interface";
export interface ShippingDOT extends Transactable {
... |
d4c0ac830b0f609864e5430088fe28020b63ae42 | TypeScript | inigo001/bizkaibus-service | /src/services/petitions/Pdf.ts | 2.59375 | 3 | import Axios, { AxiosResponse } from 'axios';
import { PetitionBase } from './_PetitionBase';
import { Line } from '@data/models';
import { ROUTES } from '@data/routes';
export class Pdf extends PetitionBase {
public petition(line: string | Line, direction: 'I' | 'V' = 'I') {
const lineString:... |
0de39ab8b5442d62e39ae1f310a5ec7c68c707b4 | TypeScript | Liinkiing/use-mercure | /src/providers/mercure.ts | 2.640625 | 3 | import { createContext, createElement } from 'react'
interface ProviderOptions {
hubUrl: string,
withCredentials?: boolean
}
interface Props {
options: ProviderOptions
}
export const MercureContext = createContext<ProviderOptions>({
hubUrl: '',
withCredentials: false
})
const MercureProvider: React.FC<Pro... |
b876c55db053a93774b156232e7b68fd1e0f51d0 | TypeScript | yubin-code/md-doc-block | /src/state/menu.ts | 2.90625 | 3 | import _ from "lodash";
import doc from '../utils/document';
/**
* 菜单方法用于生成修改添加等等操作
*/
const MenuMap = new Map();
// 菜单平行数据
const MenuFlat = {};
/**
* 替换菜单中内容
* @param menuTree 菜单树
* @param attr 被替换的内容
*/
const replaceMenu = (menuPath:string, attr: any, menuTree:any) => {
let isUpdate = false;
for(let ... |
bc784c257a8a6ac4ebc32c40d85c85ba77d7d8c8 | TypeScript | raphaelcarreiro/tiasburger-rn | /src/pages/account/address/addressReducer.ts | 2.78125 | 3 | import { ViaCepResponse } from '../../../services/postalCodeSearch';
import { Address } from '../../../@types/address';
const addressInitialState: Address = {} as Address;
interface AddressChangeAction {
type: 'ADDRESS_CHANGE';
index: string;
value: string;
}
interface SetAddressAction {
type: 'SET_ADDRESS';... |
bf0f0ba7d59258742a3841359fbf1e5207fed4c1 | TypeScript | aivarsliepa/game-platform | /src/data/User.ts | 3.203125 | 3 | export interface User {
name: string;
id: string;
room: string;
}
export class UserData {
private users: User[] = [];
addUser(user: User | User[]): void {
this.users = this.users.concat(user);
}
removeUser(id: string): User | undefined {
const removedUser = this.getUserById(id);
this.users ... |
2556913b8446dc4c5019ebd119866c676d3ba5bd | TypeScript | milangstojkovic/servicebook | /src/Containers/PresentationProvider/PresentationProvider.reducer.ts | 2.53125 | 3 | import ACTION_TYPE from '../../Store/actionTypes'
import {IPresentationProviderActions} from './PresentationProvider.actions'
import {IPresentationProviderState} from './PresentationProvider.state'
import {PageStatus} from '../../Models/Model'
const initState: IPresentationProviderState = {
pageStatus: PageStatus.... |
926406a185f6f722cfe9f0970e820c5df0f240c5 | TypeScript | lambGirl/hooks | /packages/hooks/src/useThrottleFn/index.ts | 3.203125 | 3 | /**
* 截流
* 采用hooks的方式便携式
*/
import { DependencyList, useCallback, useEffect, useRef } from 'react';
// 优化Effect更新的规则
// 第一次初始化时,打标记为true; 设置成true后,执行
import useUpdateEffect from '../useUpdateEffect';
// 声明一个方法
type noop = (...args: any[]) => any;
export interface ReturnValue<T extends any[]> {
run: (...args: T)... |
57677c9964c6ddee9ffcca9b8a100c145796d6b3 | TypeScript | shaunbennett/image-generating-nn | /src/nn/Util.ts | 3.234375 | 3 |
export class Util {
public static clamp(arg, min, max){
if(arg < min) return min;
if(arg > max) return max;
return arg;
}
public static sigmoid(z){
return 1 / (1 + Math.exp(-z));
}
public static sigmoidPrime(z){
return Util.sigmoid(z) * (1 - Util.sigmoid(z));
}
public static dot(x... |
dfa57e1b761a58c4736b8a71783d1f071e912d07 | TypeScript | tomek401273/webshop | /src/app/model/dto/shipping-address-dto.ts | 2.609375 | 3 | export class ShippingAddressDto {
private login: string;
private country: string;
private city: string;
private postCode: string;
private street: string;
private name: string;
private surname: string;
private supplier: string;
private code: string;
private search: string;
private house: number;
... |
be78ea8e5d35b3e7922faa12770431ca4a02ec1c | TypeScript | r2d2m/curves | /src/src/keyframes/HSVColorKeyframe.ts | 2.90625 | 3 | import Keyframe from './Keyframe';
import { HSVColor } from '../interfaces/HSVColor';
import NumberKeyframe from './NumberKeyframe';
class HSVColorKeyframe extends Keyframe<HSVColor> {
interpolate(keyframe: HSVColorKeyframe, time: number): HSVColor {
const floatKeyframes = this.toFloatKeyframe();
const nextF... |
1bdab0a1600c31f21228bd632ceb74552508877c | TypeScript | swcurran/aries-vcr-issuer-agency | /agency/src/utils/sleep.ts | 2.59375 | 3 | import { ServiceAddons } from '@feathersjs/feathers';
import { ServiceEventResult } from '../models/event';
import { WebhookData } from '../models/webhooks';
export function sleep<T>(ms: number): Promise<T> {
return new Promise<T>(resolve => setTimeout(resolve, ms));
}
export function deferServiceOnce<T>(
id: str... |
21f266df511c9333e7dfba70097a0a6edc6c6c9c | TypeScript | athielking/AceCalendar | /ClientApp/app/components/calendar/week/week-cell.component.ts | 2.53125 | 3 | import { Component, Input, Output, OnInit, EventEmitter } from '@angular/core'
import * as dateFns from 'date-fns';
import { DayView } from '../common/models'
import * as dateTools from '../../../tools/dateTools';
@Component({
selector: 'ac-week-cell',
templateUrl: './week-cell.component.html',
styleUrls:... |
e59b54d578bae4875d0291bdf5947127a81ecfc6 | TypeScript | dexterthemsb/giphy-task-api | /src/middlewares/authentication.ts | 2.84375 | 3 | import { Request, Response, NextFunction } from "express";
import * as jwt from "jsonwebtoken";
// token error handler
const handleJWTErrors = (err: Error) => {
switch (err.name) {
case "TokenExpiredError":
return "Session expired. Login Again.";
case "JsonWebTokenError":
return "Invalid Session.... |
591ab97fd49eebc3177656ed10216264dfbc5977 | TypeScript | goramaciej/ng-gh | /gh-app/src/app/actions/user-equipment.actions.ts | 2.59375 | 3 | import { Action } from '@ngrx/store';
import { EquipmentItemModel } from './../models/equipment-item.model';
export const ADD_ITEM = '[EQUIPMENT] AddItem';
export const REMOVE_ITEM = '[EQUIPMENT] RemoveItem';
export const ADD_ITEM_AND_OPEN = '[EQUIPMENT] AddItemAndOpen';
export class AddItemAction implements Action... |
a60861949700b9da7c2396f0a6302919c92c308f | TypeScript | davidedc/Algebrite | /tests/rect.ts | 2.65625 | 3 | import { run_test } from '../test-harness';
run_test([
// check when not assuming real variables ----------
'assumeRealVariables = 0',
'',
'rect(a)',
'rect(a)',
// same as rect(a) + i*rect(b)
// where rect(b) is abs(b)*(cos(arg(b)) + i*sin(arg(b)))
'rect(a+i*b)',
'rect(a)-abs(b)*sin(arg(b))+i*abs(b... |
c9f90ed60b2cd598c42ff2ade40f11af73dd071e | TypeScript | bviale/Babylon.js | /src/Instrumentation/babylon.sceneInstrumentation.ts | 2.71875 | 3 | module BABYLON {
/**
* This class can be used to get instrumentation data from a Babylon engine
*/
export class SceneInstrumentation implements IDisposable {
private _captureActiveMeshesEvaluationTime = false;
private _activeMeshesEvaluationTime = new PerfCounter();
... |
c3a952d93d167927ebe9ed2671cf04c242d91c7d | TypeScript | capy-pl/pnlab | /server/models/Promotions.ts | 2.921875 | 3 | import mongoose, { Document, Schema } from 'mongoose';
export type PromotionType = 'combination' | 'direct';
export interface PromotionInterface extends Document {
name: string;
type: PromotionType;
groupOne: string[];
groupTwo?: string[];
startTime: Date;
endTime: Date;
}
const PromotionSchema = new Sch... |
93b5188098e5ea86a8e7b016b57e2f8232d03376 | TypeScript | JoseMarkos/FCCIntermediateAlgorithms | /SmallestCommonMultiple.ts | 3.484375 | 3 | const getSixBasedNumersOne = (n: number): number => 6 * n - 1;
const getSixBasedNumersTwo = (n: number): number => 6 * n + 1;
const getFirstCollection = (max: number) => {
if (max == 2) {
return [max];
}
if (max == 3 || max == 4) {
return [2, 3];
}
let collection = [2, 3];
for (let index = 1; c... |
0074e89d5072d4d36b1682262996923c9e950ea1 | TypeScript | owliehq/neatsio | /packages/querier/test/queries.test.ts | 2.5625 | 3 | import * as request from 'supertest'
import * as qs from 'query-string'
import * as fs from 'fs'
import * as path from 'path'
import app from './mocks/app'
import sequelize from './mocks/db'
import { Querier } from '../src/querier'
import User from './mocks/models/user'
// May require additional time for downloadin... |
0be0eff696dd799ad6bef2250b25838b7cec8120 | TypeScript | jsaribeirolopes/gojs-angular | /projects/gojs-angular/src/lib/diagram.component.ts | 2.609375 | 3 | import { Component, ElementRef, EventEmitter, Input, NgZone, Output, ViewChild } from '@angular/core';
import * as go from 'gojs';
import { NgDiagramHelper } from './ng-diagram-helper';
@Component({
selector: 'gojs-diagram',
template: '<div #ngDiagram [className]=divClassName></div>'
})
export class DiagramCompone... |
7652b961cbbc670d9d9a0c22fccb3223b5d3c77f | TypeScript | Pet-projects/d3_sleep_chart | /src/report/data/transform.ts | 2.984375 | 3 | import * as d3 from "d3";
import DataIntervalTree from 'node-interval-tree'
import {Activity, ActivityTree, ActivityType, DayDataRow, DaysDataArray} from "../domain";
import {dateTimeToEpoch} from "../utils/time";
const ONE_SECOND = 1000;
const ONE_MINUTE = 60 * ONE_SECOND;
const ONE_HOUR = 60 * ONE_MINUTE;
const ONE_... |
78fcb87d38dcad5fad0140e095cf1a86801329ec | TypeScript | wadewadewadewadewadewade/ineffectua-firebase-functions | /functions/src/Users.ts | 2.78125 | 3 | import * as admin from 'firebase-admin';
import { firebaseUserDocumentToUser, User, UserUser, UserTag } from "./Types";
export const getUserById = (
userId: string
): Promise<User> => {
const db = admin.firestore();
return new Promise<User>((resolve, reject) => {
db.collection('users')
.doc(userId)
... |
71e1ecebb0617536df6aece81b2acd31a8d45f03 | TypeScript | AgentGhost/ShareMe | /src/app/contents/SuG.ts | 2.640625 | 3 | import { Song } from "./Contents"
// SuG (s/S)
export const SuG: Song[] = [
{ number: 1, name: "Ach bleib mit deiner Gnade" },
{ number: 2, name: "All ihr Geschöpfe unsres Herrn" },
{ number: 2, name: "Kommt, preist Ihn! Halleluja!" },
{ number: 3, name: "Alle Ehre sei meinem Retter" },
{ number: 4... |
4d07db081c9524093c37c599127e073653af8bcd | TypeScript | fwcd/logcore | /src/logger/Logger.ts | 3.34375 | 3 | import { LoggerConfiguration } from "./LoggerConfiguration";
/**
* A logging interface that consumes
* parameterized messages of arbitrary
* log levels.
*
* The most common log levels have convenience
* methods that should be delegated to 'log'.
*/
export interface Logger {
readonly config: LoggerConfiguratio... |
3ba18e16639e607faeff5a3cc87112caa38dc241 | TypeScript | jdists/handlebars | /lib/index.ts | 3.0625 | 3 | import * as handlebars from 'handlebars'
import * as jdistsUtil from 'jdists-util'
interface IHandlebarsAttrs extends jdistsUtil.IAttrs {
/**
* 数据来源
*/
data?: string
/**
* 扩展函数
*/
extend?: string
}
/**
* handlebars 模板渲染
*
* @param content 文本内容
* @param attrs 属性
* @param attrs.data 数据项,支持 JSON 和... |
99e4f3066a97e4ec6da03907fd9ec5b22f7550c5 | TypeScript | davejlin/coursera | /NandToTetris/projects/08/VMTranslator/src/Processor.ts | 2.96875 | 3 | import { Coder } from "./Coder";
import { Parser } from "./Parser";
import { commentSymbol, CommandType, spaceSymbol } from "./Constants";
import os = require("os");
export class Processor {
private currentFunctionName = "";
constructor(
private parser: Parser,
private coder: Coder
) {}
... |
cebf9c153ed578ba5d96f2e0d063c62d617ca2d6 | TypeScript | svarelave/dirmod-test-react | /src/utils/handlerError.ts | 2.6875 | 3 | import { showError } from "./general";
import i18n from "./i18n";
export const INTERNAL_SERVER_ERROR = 500;
export const NOT_FOUND_ERROR = 404;
export const UNAUTHORIZED = 401;
export const UNPROCESSABLE_ENTITY = 422;
export const FORBIDDEN = 403;
export const handlerError = (error: any) => {
const { message, respo... |
7178c74e269989b56ce169906f75268eb816c1e2 | TypeScript | Oxicode/marble | /packages/core/src/effects/effects.helpers.spec.ts | 2.65625 | 3 | import { mapTo } from 'rxjs/operators';
import { isEffect, isGroup } from './effects.helpers';
import { Effect, GroupedEffects } from './effects.interface';
describe('Effects helpers', () => {
it('#isGroup checks if parameters is GroupedEffects type', () => {
expect(isGroup({ path: '/test', effects: [] })).toBe... |
06583f5a61710923df91da8066d3adc1c1d60ddc | TypeScript | kenchoong/expo-react-bunny | /src/stores/sys/reducer.ts | 2.703125 | 3 | import {SysActions} from "./actions";
import {Sys} from "../../types/models";
import {ESys} from "../../types/constants";
export const initialState: Sys = {
error: "",
warn: "",
};
export function sysStateReducer(state: Sys = initialState, {type, payload}: SysActions): Sys {
switch (type) {
case E... |