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 |
|---|---|---|---|---|---|---|
c8ab83bf72075693c3edf3374fae4f5b0333d5de | TypeScript | AdrianSalvador21/ionic-tracking-expense | /src/app/core/reducers/auth.reducer.ts | 2.734375 | 3 | import * as fromAuth from '../actions/auth.actions';
export interface AuthState {
userData: any;
}
const initialStatus: AuthState = {
userData: {}
};
export function userReducer( state = initialStatus, action: fromAuth.actions ): any {
switch ( action.type ) {
case fromAuth.SET_USER:
return {
... |
2ebfdab56b7ee845e48e135258eed2b22b3f7688 | TypeScript | painterner/react-starter | /src/common/helper.ts | 2.609375 | 3 | export function delayPromise(data: any, time: number) {
return new Promise(res => {
setTimeout(() => {
res(data)
}, time);
})
} |
c5b471313adedecc2c8c3086cad473a2bfc00a45 | TypeScript | repetere/promisie | /src/index.ts | 2.90625 | 3 | import utilities from './utilities';
import { SettleValues } from './utilities/settle';
export interface PromisifyAllOptions {
recursive?: boolean;
readonly?: boolean;
}
export interface ParallelOptions {
recursive?: boolean;
concurrency?: number;
}
export interface RetryOptions {
times?: num... |
f9d121d15641cbaf30ff6696d0c1c5a037bfd1bd | TypeScript | yhagio/ts-js-algo | /src/practice9-solution.ts | 4 | 4 | // Write a function, makeChange, that returns an integer that represents
// the least number of coins that add up to an amount where
// the amount is always divisible by 5.
// coin values: 5, 10, 25
export function makeChange(coins: number[], input: number): number {
if (input % 5 !== 0) {
throw new Error("Inpu... |
9ce6fdb92aeae6f977e7ab2c220859c1baebc838 | TypeScript | waynevanson/accounting-ts | /dist/domain.d.ts | 3.265625 | 3 | import { Newtype } from "newtype-ts";
import { NonZero } from "newtype-ts/lib/NonZero";
/**
* @summary
* A limitless (by javascript's terms) number that should not equal the following:
* - `0`
* - `Infinity`
* - `NaN`
*
* @todo Allow for numbers greater than what javascript's number type can handle.
* @todo dec... |
216143ec76aa4f81c66fab4a6b4fa2387ac054bd | TypeScript | zeropool/StyleGuide | /StyleGuide/AtlasClient/Client/Core/DataStudio/src/scripts/application/shared/AuthHelpers.ts | 2.765625 | 3 | /// <reference path="../../../references.d.ts" />
module Microsoft.DataStudio.AuthHelpers {
import TypeInfo = Microsoft.DataStudio.Diagnostics.TypeInfo;
export function extractPuid(token: any): string {
var parsedToken = jwt.decode(token);
if (TypeInfo.isDefined(parsedToken.puid)) { // AAD us... |
b62b3472ba37eb53bf3b789ad91f61cfa19e5e30 | TypeScript | jcmelchorp/proyecto-calli | /projects/calli/src/app/quiz/store/quiz.actions.ts | 2.609375 | 3 | import { Action } from '@ngrx/store';
import { Quiz } from '../models/quiz.model';
export enum QuizActionTypes {
QUIZ_QUERY = '[Quiz] Query',
QUIZ_LOADED = '[Quiz] Fetched',
QUIZ_ADDED = '[Quiz] Added',
QUIZ_EDITED = '[Quiz] Edited',
QUIZ_DELETED = '[Quiz] Deleted',
QUIZ_ERROR = '[Quiz] Error',
}
expor... |
5b3028ca586f7d130e29490c6e93cbf55d7ab1ff | TypeScript | actions-cool/analyze-action | /src/index.ts | 3.0625 | 3 | const ifCount = (owner: string, countOfficial: boolean) => {
let result = true;
if (!countOfficial) {
if (owner === 'github' || owner === 'actions') {
result = false;
}
}
return result;
};
export type ACTION_TYPE = {
owner: string;
repo: string;
version: string;
};
export type RESULT_TYPE ... |
6b5c294398307a2c06540a232f4f257f4341b02f | TypeScript | ai-overflow/ai_backend | /frontend/src/store/modules/auth/state.ts | 2.890625 | 3 |
export interface AuthTokenType {
accessToken: string | null,
tokenExpiration: Date,
tokenType: string | null
}
const defaultAuthToken: AuthTokenType | null = {
accessToken: '',
tokenExpiration: new Date(),
tokenType: ''
};
const authToken: AuthTokenType | null = JSON.parse(localStorage.getIt... |
6aa7a81cd76f81a8a21cb0fbe6ef5679ce45b41d | TypeScript | rogemus/Tetris | /src/core/game/Player.ts | 2.90625 | 3 | import { Position, RotationDirection } from '../../types';
import { dispatchEvent } from '../../utils';
import { ROWS_REMOVED_EVENT, SCORE_UPDATE_EVENT, SPEED_UPDATE_EVENT } from './events';
import Piece from './Piece';
class Player {
public nextPiece: Piece = new Piece();
public piece: Piece = new Piece();
publ... |
66cb9af748272674e79ef0b0dfb60fd274863bc2 | TypeScript | markgoho/ng2-wp-api | /examples/Collection using the service.ts | 2.765625 | 3 | /*
* In this example, we display a collection of posts, pagination and a button to load the next page.
* we also set the QueryArgs for the request to get embedded posts and filter the results to 6 posts per page
*
* get pagination properties from `wpCollection.service`
*/
import { Component, OnInit } from '@angul... |
a7dbaade3037328f5deba30a8467a8946f44dc47 | TypeScript | jakobwesthoff/tosec-tool | /src/Library/CrcStream.ts | 2.8125 | 3 | import { crc32 } from "crc";
import { Duplex, DuplexOptions } from "stream";
export class CrcStream extends Duplex {
private lastValue: number;
constructor(options?: DuplexOptions) {
super({...options, encoding: "utf8"});
}
// tslint:disable-next-line:function-name
public _write(
chunk: any,
_e... |
5f1d01dc0d6ed430cd58930f6484276b77951c76 | TypeScript | chrisk8er/animation-editor | /src/area/util/areaUtils.ts | 3.015625 | 3 | import { AREA_PLACEMENT_TRESHOLD } from "~/area/state/areaConstants";
import { AreaReducerState } from "~/area/state/areaReducer";
import { isVecInRect } from "~/util/math";
export const getHoveredAreaId = (
position: Vec2,
areaState: AreaReducerState,
areaToViewport: {
[areaId: string]: Rect;
},
): string | und... |
d218107f8b98e98d4c808341ef92ae92bf8c6f3b | TypeScript | packpacka/vue-dc-app | /src/app/store/mutations.ts | 3.21875 | 3 | interface IMutationLink<T> {
saveAddress: T;
clearAddress: T;
}
type Mutation = (state: any, payload: any) => void;
interface IMutations extends IMutationLink<Mutation> { }
export const mutations: IMutations = {
saveAddress: (state, address: string) => {
state.selectedAddress = address;
},
clearAddress... |
7d85fd58940b6164410160a62c0d7b91cc61f4ea | TypeScript | up-n-running/Record-Of-Support-Workbook | /LSA Workbook/lsa/lsa-utils.ts | 2.5625 | 3 | function isAMasterNotAChild( spreadSheet, globalSettingsWorkSheet, alertIfMaster ) {
Logger.log( "isAMasterNotAChild called" )
//get default values for params if any params are missing
spreadSheet = (spreadSheet) ? spreadSheet : SpreadsheetApp.getActiveSpreadsheet();
globalSettingsWorkSheet = (globalSettin... |
ce09c01cc722df90ff6b47fd66e3e9662dc3ec85 | TypeScript | baijiadu/auktionator | /client/cordova/app/util/util.ts | 2.8125 | 3 | export const Util = {
generateRandomStr(start) {
start = start || 2;
return Math.random().toString(36).substring(start);
},
isIdNumber(idNumber) {
if (!/^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/.test(idNum... |
cebdc915ffae1d48421a28b2ad954e55d4aa885d | TypeScript | HanRenHui/react-eleme | /src/store/reducer/user.ts | 2.734375 | 3 | import { Action } from '../../interface/user'
import { fromJS } from 'immutable'
import * as types from '../action-types'
const defaultState = fromJS({
userinfo: null,
address: []
})
export default function reducer(state=defaultState, action: Action) {
switch(action.type) {
case types.SET_USER_INFO:
re... |
55e8e2c2f3ea2120a245e199303a6f96cb057108 | TypeScript | gary837837/EPGStation | /src/server/DBRevisionChecker.ts | 2.578125 | 3 | import * as fs from 'fs';
import * as path from 'path';
import Base from './Base';
import DBRevisionInfo from './DBRevisionInfoInterface';
import DBTableBase from './Model/DB/DBTableBase';
import MigrationBase from './Model/DB/MigrationBase';
import factory from './Model/ModelFactory';
/**
* DBRevisionChecker
*/
cla... |
86881ae3b6f234d6f97c60e577d4f64f32d7e867 | TypeScript | sYsguard/collie-cli | /src/db/meta.ts | 2.546875 | 3 | /**
* Contains meta information about the tenants in this directory.
* Can be used to perform some sort of migrations and or control when
* the last collection took place.
*/
export interface Meta {
version: number;
tenantCollection: {
lastCollection: string;
};
iamCollection?: {
lastCollection: str... |
d53710e9ea1a2e4352b52a5c7d9d84e3b5ec990a | TypeScript | morgadodesarrollador/aturistico | /routes/usuario.ts | 2.921875 | 3 |
import { Router, Request, Response } from 'express';
import { UsuarioModel } from '../models/usuario.model'
import bcrypt from 'bcrypt';
import Token from "../clases/tokens";
import { MDLcheckToken } from "../middleware/autenticacion";
const userRoutes = Router();
//Login
userRoutes.post('/login', (req: Requ... |
3964d4ce98552e18b7de5dc68f87109279a16929 | TypeScript | choyongjoon/life-in-weeks | /src/models/Life.ts | 3.15625 | 3 | import { isNil, range } from 'lodash'
import Week from './Week'
import Year from './Year'
export default class Life {
public static maxNumYears = 200
public dob: string
public lifeExpectancy: number
public years: Year[]
constructor(dob: string, lifeExpectancy: number) {
this.dob = dob
this.lifeExp... |
838bccdfbb995445bebae41dfb5f97c07f958dbe | TypeScript | sebastianrachfal/next-article-explorer | /src/features/article/calls.ts | 2.546875 | 3 | import { ArticleData } from './interfaces';
import { ArticlePageData } from './pageInterfaces';
export const fetchArticleData = async (page: number = 1): Promise<ArticleData[]> => {
try {
let data = await fetch(`${process.env.NEXT_PUBLIC_API_HOST}/api/graphql`, {
method: 'POST',
body: ` makeRestCall {
... |
70a714fb01ab191652beb5325924c887f62ea4a8 | TypeScript | Pwera/Playground | /deno/nasa/api.ts | 2.53125 | 3 | import { Router } from "./deps.ts";
import * as planets from "./models/planets.ts";
import * as launches from "./models/launches.ts";
const router = new Router();
router.get("/", (ctx) => {
ctx.response.body = "NASA";
});
router.get("/planets", (ctx) => {
const response = planets.getAllPlanets();
ctx.response.... |
b1fbebd2ca6bfb9d4527a9065fe10b7e350f5937 | TypeScript | CheckPointSW/smart-console-extensions | /src/uuid.ts | 2.6875 | 3 | /**
* Convert array of 16 byte values to UUID string format of the form:
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
*/
const crypto = require('crypto');
function rng() {
return crypto.randomBytes(16);
}
let byteToHex: any = [];
for (let j = 0; j < 256; ++j) {
byteToHex[j] = (j + 0x100).toString(16).substr(1);
}
f... |
7d2f754c95b80cae0f9508d74d7dc67348106d01 | TypeScript | delprofundo/serverless-chassis-typescript | /src/sec/permissionsMatrix.ts | 2.75 | 3 | /** ******************************************
* AUTH HARNESS PERMISSIONS MATRIX
* simple matrix mapping permissions to functions in
* this service.
* 22 March 2018
* delProfundo (@brunowatt)
* bruno@hypermedia.tech
******************************************* */
import * as logger from "log-winston-aws-level";
i... |
e8c62b6d029295cb87823e197ea37c4b98c21355 | TypeScript | cpmech/cloud | /az-cognito/src/admin/types.ts | 2.53125 | 3 | import AWS from 'aws-sdk';
export type ICognitoUserType = AWS.CognitoIdentityServiceProvider.UserType;
export type IAdminUserResponse = AWS.CognitoIdentityServiceProvider.AdminGetUserResponse;
export interface ICognitoUser extends Omit<ICognitoUserType, 'Attributes'> {
Data: {
[key: string]: string;
};
}
ex... |
94ae996c8954fb7ade996b7e9a71fca57f28e993 | TypeScript | dev-warner/dc-visualization-sdk | /packages/dc-visualization-core/src/__tests__/deliveryKey.spec.ts | 2.546875 | 3 | import { ClientConnection } from 'message-event-channel'
import { DeliveryKey } from '../delivery-key'
describe('DeliveryKey', () => {
describe('get', () => {
it('should call connection with get key and return string', async () => {
const on = jest.fn()
const request = jest.fn(() => 'some-content-key... |
c78c49ac5f3f8655b466830344bffc253ed0d122 | TypeScript | Turro75/rp2040js | /demo/intelhex.ts | 2.625 | 3 | /**
* Minimal Intel HEX loader
* Part of AVR8js
*
* Copyright (C) 2019, Uri Shaked
*/
export function loadHex(source: string, target: Uint8Array, baseAddress: number = 0) {
let highAddressBytes = 0;
for (const line of source.split('\n')) {
if (line[0] === ':' && line.substr(7, 2) === '04') {
highAdd... |
97b9c65addbfad9b938c9615d8ca572099c0f6e9 | TypeScript | Swamp-boy/FSD-3-Slider | /src/components/ts/MinMaxFields/MinMaxFields.ts | 2.8125 | 3 | class MinMaxFields {
public min: number;
public max: number;
public sliderField: HTMLElement;
public minField: HTMLElement;
public minSpan: HTMLElement;
public maxField: HTMLElement;
public maxSpan: HTMLElement;
constructor(sliderField: HTMLElement, min: number, max: number) {
... |
13d39be00eb872b53003bad3ba457355571b8978 | TypeScript | syedMohib44/Deception-Aura-Web | /api/entity/SuperAdmin.ts | 2.796875 | 3 | import { Schema, Document, model } from 'mongoose';
export interface ISuperAdmin extends Document {
_id: any;
email: string;
password: string;
lastLogin?: Date;
refreshToken?: string;
}
const SuperAdminSchema = new Schema({
email: { type: String, required: true, unique: true, trim: true, lower... |
1e500bddb991e60fc3bd3e9456f070c482ae7c7a | TypeScript | angelisco1/curso-sopra-3 | /angular/proyecto/src/app/cmp-formularios/cmp-formularios.component.ts | 2.625 | 3 | import { Component, OnInit } from '@angular/core';
import { FormControl, FormGroup, Validators, FormBuilder } from '@angular/forms';
@Component({
selector: 'app-cmp-formularios',
templateUrl: './cmp-formularios.component.html',
styleUrls: ['./cmp-formularios.component.css']
})
export class CmpFormulariosComponen... |
e18c73835c254356fe88dc58a9a7196823f2965e | TypeScript | Megaloden106/personal-finance-manager | /client/store/models/action.ts | 2.640625 | 3 | import { Action } from 'redux';
import { Epic } from 'redux-observable';
import { AxiosPromise, AxiosError } from 'axios';
export interface Metadata {
[propName: string]: any;
}
export interface FluxAction<T> extends Action<string> {
type: string;
payload?: T;
error?: boolean;
meta?: Metadata;
}
export typ... |
97b4f8b510e4437eed17c38eb3add390a20f0885 | TypeScript | Kauto/animationvideo | /src/Sprites/Text.ts | 2.796875 | 3 | import calc from "../func/calc";
import type { OrFunction } from "../helper";
import { Position } from "../Position";
import { AdditionalModifier } from "../Scene";
import { CircleParameterList, SpriteCircleOptions } from "./Circle";
import { ISprite, SpriteBase, SpriteBaseOptionsInternal } from "./Sprite";
export int... |
6c5db6ba732149653ba57ebe1925f368192dd417 | TypeScript | hitmaneac/3fs | /src/app/helper.service.ts | 2.59375 | 3 | import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class HelperService {
constructor() {
}
bytesToSize(bytes) {
let sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
if (bytes == 0) return '0 Bytes';
let i = Math.floor(Math.log(bytes) / Math.log(1024));
return `${M... |
c07d209cdaa40cf674f358b228eab73731c2605c | TypeScript | ryanArora/CalmBot | /src/commands/moderation/format.ts | 2.96875 | 3 | import { Message, MessageAttachment } from "discord.js";
import Client from "../../structures/Client";
import { ICommand, PermissionsEnum, RunCallback } from "../../structures/Interfaces";
const format = "**Type of Punishment:** PUNISHMENT_TYPE\n**Discord name & #:** DISCORD_NAME\n**Discord ID:** DISCORD_ID\n**Evidenc... |
cb2bbb18cea1337f57824ec48a2aac88289da1f0 | TypeScript | aeoncleanse/PracticeReact | /application/server/src/dataShapes.ts | 2.65625 | 3 | // We want our query to return in this shape
export interface Data {
"id": number,
"createdAt": Date,
"updatedAt": Date,
"title": string
}
|
87380d0d7b2361a059b29af12691137513702829 | TypeScript | cjol/fauna-fp | /src/curry/replaceStrRegex.ts | 2.921875 | 3 | import * as fns from "../fns";
import { Arg, Query } from "../types";
/**
* Replaces a portion of a string with another string.
*/
export function replaceStrRegex(
pattern: Arg<string>,
replacement: Arg<string>
): (haystack: Arg<string>) => Query<string>;
export function replaceStrRegex(
pattern: Arg<string>
)... |
bf47ec0788154f98f27469fc27a33a7711c48b2f | TypeScript | robotty/dank-twitch-irc | /lib/message/parser/tag-values.spec.ts | 2.703125 | 3 | import { assert } from "chai";
import { assertThrowsChain } from "../../helpers.spec";
import { TwitchBadge } from "../badge";
import { TwitchBadgesList } from "../badges";
import { TwitchEmote } from "../emote";
import { MissingTagError } from "./missing-tag-error";
import { ParseError } from "./parse-error";
import {... |
ea0afcd3ca72f24ee96e573893e957b04e86cb79 | TypeScript | yelhouti/primeng | /src/app/showcase/doc/selectbutton/multipledoc.ts | 2.640625 | 3 | import { Component, Input } from '@angular/core';
import { Code } from '../../domain/code';
@Component({
selector: 'multiple-doc',
template: ` <section>
<app-docsectiontext [title]="title" [id]="id">
<p>SelectButton allows selecting only one item by default and setting <i>multiple</i> optio... |
cecab3d8e8220b686db41fb428dac7b747e6cc96 | TypeScript | sparkdesignsystem/spark-design-system | /angular/projects/spark-angular/src/lib/directives/inputs/sprk-radio-input/sprk-radio-input.directive.ts | 2.546875 | 3 | import { Directive, Input, HostBinding, ElementRef } from '@angular/core';
@Directive({
selector: '[sprkRadioInput]',
})
export class SprkRadioInputDirective {
constructor(public ref: ElementRef) {}
/**
* This will be used to determine the variant of
* the radio input.
*/
@Input()
variant: 'huge' |... |
11ebc6036f29216564b811af69eef27de9123b6d | TypeScript | IgnatZakalinsky/cards-back-3-0 | /src/p1-common/c1-errors/errors.ts | 3.296875 | 3 | export const toSimpleSafely = (value: any) => {
if (typeof value === 'boolean'
|| typeof value === 'number'
|| typeof value === 'string'
|| typeof value === 'undefined'
|| value === null
) return value
else if (typeof value === 'object') return value.toString()
else retur... |
aef629c34c05f6bfd2badd654cafc4f0f263c7b9 | TypeScript | bgauthier555/ux-common-interface | /src/ComponentContainer.ts | 3 | 3 | /**
* Component container, allows to add multiple child components
*
* @copyright Benoit Gauthier <bgauthier555@gmail.com>
* @author Benoit Gauthier <bgauthier555@gmail.com>
* @licence MIT
*/
import {Component} from "./Component";
abstract class ComponentContainer extends Component {
/**
* Component s... |
83d561d1d1a517bd99bf230142810bbadc63e95a | TypeScript | Furmanus/AbyssRL | /src/scripts/timeEngine/queueMember.ts | 2.8125 | 3 | import { IActor } from '../entity/entity_interfaces';
import { dungeonState } from '../state/application.state';
export interface SerializedQueueMember {
nextActionAt: number;
actorId: string | IActor;
isRepeatable: boolean;
lastSavedActorSpeed: number;
}
export class QueueMember {
public nextActionAt: numb... |
35e3293ff13d57c58c178a733482c3ea9e6ec869 | TypeScript | krzosa/Genetic-algorithm | /src/utils/random.ts | 3.265625 | 3 | export function getRandomInt(min: number, max: number) {
return Math.floor(Math.random() * (max - min + 1) + min);
}
export function getRandomIndexs(n: number) {
var indexs = []
for(let i = 0; i<n; i++) {
indexs.push(i)
}
let randomIndexs = []
let i = indexs.length
while (i--) {
... |
9922fc06f4caff5b73eb4da21d23de4c15c1e8bc | TypeScript | tuxcy17/typescript-dp | /src/Observer/Subject.ts | 2.859375 | 3 | import * as _ from 'underscore';
import {Observer} from './Observer';
abstract class Subject {
// Fields
private observers: Array<Observer> = [];
public attach(observer: Observer): void {
this.observers.push(observer);
}
public detach(observer: Observer): void {
let index: number;... |
68d135492980cdd6c5e3f96c92f604b914685c0e | TypeScript | OctopusDeploy/OctoTFS | /source/tasks/Utils/taskInput.ts | 3.046875 | 3 | import * as tasks from "azure-pipelines-task-lib/task";
export interface TaskWrapper {
getInput(name: string, required?: boolean): string | undefined;
getBoolean(name: string, required?: boolean): boolean | undefined;
setSuccess(message: string, done?: boolean): void;
setFailure(message: string, done?:... |
a2ee105eb3ea3dc22f4f31b429e11251e578d9dc | TypeScript | gfregalado/Typescript-Sandbox | /Typescript 3rd Party Libraries & Typescript/src/app.ts | 2.875 | 3 | import "reflect-metadata"
import {plainToClass} from "class-transformer"
import { Product } from "./product.model"
const products = [{title:"A Carpet", price: 29.99}, {title:"A Carpet 2", price: 39.99}]
//const p1 = new Product('A book', 12.99)
/* const loadedProducts = products.map(prod => {
return new Product(... |
87e5010d6ec6f70a54741c3d9fa3fc14b35d3bd9 | TypeScript | nicolas-zanardo/crm_and_stockWine | /assets/app/shared/components/navbar/employees/mainNavbar/nav/components/MainTopBar.ts | 2.8125 | 3 | import ComponentsMainNavBar from "../ComponentsMainNavBar";
export default class MainTopBar extends ComponentsMainNavBar {
constructor() {
super();
this.onInit();
this.endLoad();
}
/**
* onInit()
* --------
* function that starts when the class is insta... |
0e5718177af2e40a3570b772172310fa1666b2a9 | TypeScript | msdiles/scylla | /client/src/state/types/app.types.ts | 2.65625 | 3 | export const APP_SET_ERROR = "APP_SET_ERROR"
export const APP_REMOVE_ERROR = "APP_REMOVE_ERROR"
export const APP_SET_MESSAGE = "APP_SET_MESSAGE"
export const APP_REMOVE_MESSAGE = "APP_REMOVE_MESSAGE"
export const APP_REDIRECT = "APP_REDIRECT"
//SetError
export interface SetErrorPayload {
error: string
}
interface... |
cd4b0f7145b105b10fc6e6d707896264a4cbf8b1 | TypeScript | kiurchv/fhir-codegen | /src/generated/FhirSampledData.ts | 2.609375 | 3 | import * as t from 'io-ts'
import { FhirDecimal } from './FhirDecimal'
import { FhirElement } from './FhirElement'
import { FhirExtension } from './FhirExtension'
import { FhirPositiveInt } from './FhirPositiveInt'
import { FhirQuantity } from './FhirQuantity'
import { FhirString } from './FhirString'
/** A series of ... |
2a82d798d5e4b07883744328e6292cfd97ff058e | TypeScript | chromium/chromium | /ui/file_manager/file_manager/state/ducks/folder_shortcuts_unittest.ts | 2.515625 | 3 | // Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// TODO(b/296792757)
import '../store.js';
import {MockFileSystem} from '../../common/js/mock_entry.js';
import {State} from '../../externs/ts/state.js';
import {setUpFileMana... |
ba460fe519d9575a1373bd603d9b0d6dc6fbc7dc | TypeScript | vinodharani/TypeScript-Basics | /enum/enum.ts | 3.578125 | 4 | enum DaysOfTheWeek {
MON = 1, TUE, WED, THU, FRI, SAT, SUN
}
// when you assign a value to MON, the other days takes a value of 2, 3, 4 etc
// or you can manually assign a value by using the =
let day : DaysOfTheWeek;
day = DaysOfTheWeek.MON;
if (day === DaysOfTheWeek.MON) {
console.log("Got to go to work"... |
1918fc276779e104226785abc9d07571d4447b2e | TypeScript | PierreLeduc/RobotlegsJS | /src/robotlegs/bender/framework/impl/getQualifiedClassName.ts | 3 | 3 | // ------------------------------------------------------------------------------
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//
// NOTICE: You are permitted to use, modify, and distribute this file
// in accordance with the terms of the license agreement accompanying it.
// --------------------... |
ea43cd302f0f02bfaf9204fcf819570b5638ffbb | TypeScript | miryambathilde/ListadoEmpleados | /src/app/components/empleado-list/empleado-list.component.ts | 2.671875 | 3 | import { Component, OnInit } from '@angular/core';
/* modelo de la clase empleado */
import { Empleado } from 'src/app/models/Empleado';
@Component({
selector: 'app-empleado-list',
templateUrl: './empleado-list.component.html',
styleUrls: ['./empleado-list.component.css']
})
export class EmpleadoListComponent im... |
0da0b0e8ff2e4a8faa587799998d96aa0ff8116d | TypeScript | paullewallencom/angular-978-1-7864-6669-3 | /_/Section 5/app.component.ts | 2.578125 | 3 | import { Component } from '@angular/core';
@Component({
selector: 'd3-app',
template: `
<div [style.background]="backgroundColor">
<h2>Hello, world! I'm learning {{course}} and my favorite color is <span [style.color]="favoriteColor">{{favoriteColor}}</span>.</h2>
<label>Enter favorite color: </lab... |
cfd48a3907635c23038ccd20b91b18a6862b3df5 | TypeScript | anzen-marco/heroes | /src/app/heroes/heroes.component.ts | 3.5625 | 4 | import { Component, OnInit } from '@angular/core';
import { Hero } from '../hero'; //Se importa la interface creada
import { HEROES } from '../mock-heroes'; //Listado de héroes demos guardados en un array con los que se va a trabajar.
import { HeroService } from '../hero.service';//Se importa el servicio.
import { Mess... |
dcb6260f0c30b56027045721f8dddacc371fb388 | TypeScript | krivtsov/exercism | /typescript/space-age/space-age.ts | 3.203125 | 3 | class SpaceAge {
seconds: number;
constructor(age: number) {
this.seconds = age;
}
getAge = (planetYear: number) => +(this.seconds / 60 / 60 / 24 / 365.25 / planetYear).toFixed(2);
onEarth = () => {
const earthYear = 1;
return this.getAge(earthYear);
};
onMercury() {
const mercuryYear ... |
877501a8df73c1acbe803a5e93c8fdd0847205e6 | TypeScript | rpinaa/spa-architecture-angular-domain | /src/app/common/pipes/enumeration.pipe.ts | 2.53125 | 3 | import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'enumeration'
})
export class EnumerationPipe implements PipeTransform {
transform(value: number, args?: number): string {
return value ? ('0' + value).slice(-args) : value + '';
}
}
|
5a323c57e6c82efd98290fd603fa060f269753e0 | TypeScript | sorsogon/production | /src/utils/filters.ts | 2.6875 | 3 | import Vue, { PluginObject } from 'vue';
export default new class implements PluginObject<undefined> {
public install(_Vue: typeof Vue) {
/**
*
*/
Vue.filter('formatDateString', (date: Date) => {
const dateString = date.toLocaleDateString();
const time: any[] = [ date.getHours(), dat... |
73a95680d68359d527e856448517b3646fd97b1d | TypeScript | marinp1/toggl-2-toggl | /service/types/dynamo.ts | 3.078125 | 3 | export type DynamoSingleValue = string | number | boolean | null;
export type DynamoMapValue<T extends Record<string, any> = {}> = {
readonly [x in keyof T]: T[x] extends object
? DynamoMapValue<T[x]>
: T[x] extends any[]
? DynamoArrayValue<T[x]>
: T[x];
};
export interface DynamoArrayValue<T>
ext... |
53884422b8eb9755d97c94b268aadb6cbd2235e9 | TypeScript | NepipenkoIgor/rxjs200321 | /0-theory/old/multicasting.ts | 2.6875 | 3 | import { BehaviorSubject, ConnectableObservable, interval, ReplaySubject, Subject, Subscription } from "rxjs";
import { multicast, publish, refCount, share } from "rxjs/operators";
const sequence$ = interval(1000)
.pipe(
share()
// publish + refCount = share()
// multicast(subject) = publis... |
b93857a8299795fc2e0719122b994f1f6709fd58 | TypeScript | neat-soft/next.js | /packages/next/build/compiler.ts | 2.609375 | 3 | import webpack from 'webpack'
export type CompilerResult = {
errors: Error[],
warnings: Error[]
}
export function runCompiler (config: webpack.Configuration[]): Promise<CompilerResult> {
return new Promise(async (resolve, reject) => {
const compiler = webpack(config)
compiler.run((err, multiStats: any) ... |
cf8071e1bba6aa4f3940d1746e617f2ca7ffbf21 | TypeScript | RaduSzasz/TS2JaVerT | /src/assertions/CustomPredicate.ts | 2.859375 | 3 | import { AssertionKind } from "./Assertion";
import { AssertionObject } from "./AssertionObject";
export class CustomPredicate extends AssertionObject {
private readonly varNames: string[];
constructor(private predicateName: string, ...varNames: string[]) {
super (AssertionKind.Custom);
this.va... |
538a06c9e221ad73fde8950e9cfe974bc3d515ff | TypeScript | forkkit/rippledb | /src/tests/sstable.test.ts | 2.625 | 3 | import fs from 'fs'
import Slice from '../Slice'
import SSTable from '../SSTable'
import SSTableBuilder from '../SSTableBuilder'
import { getTableFilename } from '../Filename'
import { createDir, cleanup } from '../../fixtures/dbpath'
import { Options } from '../Options'
import { random } from '../../fixtures/random'
i... |
56cf40ccc9fe7b8d277a3e00603823328d805413 | TypeScript | here4you81/n2server | /back/src/apple/apple.service.ts | 2.546875 | 3 | import { Injectable } from '@nestjs/common';
import { CreateAppleDto } from './dto/create-apple.dto';
import { UpdateAppleDto } from './dto/update-apple.dto';
@Injectable()
export class AppleService {
create(createAppleDto: CreateAppleDto) {
return 'This action adds a new apple';
}
findAll() {
return `T... |
bba7f902fc0798f4a77b62c5874c3c70b7e3afab | TypeScript | VitaminCtea/ts-canvas | /src/scrollBar/map.ts | 2.921875 | 3 | export type Info<T = string> = {
offset: T,
scroll: T,
scrollSize: T,
size: T,
axis: T,
client: T,
direction: T,
content: T
}
type Map = {
vertical: Info
horizontal: Info
}
export const map: Map = {
vertical: {
offset: 'offsetHeight',
scroll: 'scrollTop',
... |
96408bb6d0270d877bda407c99a5d004cd731c10 | TypeScript | fochlac/mui-feedback-dialog-connected | /lib/utils/http.ts | 2.578125 | 3 | const headers = {
Accept: 'application/json',
'Content-Type': 'application/json'
}
export const getRequest = (url:string):Promise<unknown> => {
return fetch(url, { headers }).then((res) => (res.status < 400 ? res.json() : Promise.reject(res.json())))
}
export const postRequest = (url: string, body: Record... |
99e76f3ffb2de427a8775af1271e4d85280eaeec | TypeScript | keff6/100AlgorithmsChallenge | /bishopAndPawn/bishopAndPawn.ts | 3.40625 | 3 | function bishopAndPawn(bishop: string, pawn: string): boolean {
const letterPosition = {
a: 1, b: 2, c: 3, d: 4,
e: 5, f: 6, g: 7, h: 8,
}
const [bishopX, bishopY] = [letterPosition[bishop[0]], parseInt(bishop[1])];
const [pawnX, pawnY] = [letterPosition[pawn[0]], parseInt(pawn[1])];
return (... |
e966f1197bd577788285e9b484e03d31964c94ca | TypeScript | crisantizan/santz-framework-php | /public/typescript/src/libs/MethodValidate.ts | 2.796875 | 3 | // Clase que debe ser usada por cualquier controlador creado,
// permite llamar un método específico cuando este existe
export class MethodValidate {
public methodExist (method:string) {
let self = 'this.';
method = `${self}${method}`;
return (eval(method));
}
} |
0869ffe9ccd58adbee845516152fdf2c54a63feb | TypeScript | NotGamerPro/nodepolus2 | /lib/packets/packetElements/clientVersion.ts | 3.15625 | 3 | export class ClientVersion {
public readonly year: number;
public readonly month: number;
public readonly day: number;
public readonly revision: number;
constructor(year: number, month: number, day: number, revision: number) {
this.year = year;
this.month = month;
this.day = day;
this.revision... |
3dd99da5570828b25f310115bbf84e4fd155780a | TypeScript | easy261925/ant-design-pro-spring-boot | /src/utils/axios.ts | 2.78125 | 3 | import axios, { AxiosRequestConfig } from 'axios';
import { notification } from 'antd';
import { PROJECT_NAME } from '@/utils/CONSTANTS'
const PROJECT_TOKEN = `${PROJECT_NAME}_TOKEN`
/**
* 获取 token (接口访问权限)
*/
const getToken = () => localStorage.getItem(PROJECT_TOKEN);
/**
* 设置 token
*/
const setToken = (token: ... |
e291ea87ef18cd62875e7693d50de208884edf7e | TypeScript | ulrichomega/adventofcode2017 | /2_2.ts | 3.140625 | 3 | import * as fs from "fs";
import * as _ from "lodash";
const fileContents: string = fs.readFileSync("inputs/2_1", {encoding: "utf8"}).trim();
const stringResults: string[][] = _.map(_.split(fileContents, "\n"), (input: string) => {
return _.split(input, "\t");
});
const intResults: number[][] = _.map(stringResul... |
d8d9f1f19f30816d6bca36705ec5f00f2ebccc14 | TypeScript | AFASResearch/mobile-web-experiments | /src/utilities.ts | 2.65625 | 3 | import {UserInfo} from './interfaces';
let moment = <any>require('moment');
export let randomId = () => Math.random().toString(36).substr(2);
export let nameOfUser = (user: UserInfo) => {
if (!user) {
return '';
}
return `${user.firstName} ${user.lastName}`;
};
export let getFormattedDate = (date: Date) =>... |
844269646eb5577da0fa2a09318d394a1d3ad549 | TypeScript | JoseRFelix/my-study-planner-api | /src/services/user.ts | 2.515625 | 3 | import {Service, Inject} from 'typedi'
import {IUser} from '../interfaces/IUser'
import cloudinary from '../loaders/cloudinary'
import IUserConfig from '../interfaces/IUserConfig'
@Service()
export default class UserService {
constructor(
@Inject('userModel') private userModel: Models.UserModel,
@Inject('log... |
687a226b4e19ad946d6065736d90de660da0cb4b | TypeScript | evilbinary/typescript-pipeline | /src/object.ts | 2.78125 | 3 | import { deepGet } from './other';
import { processPipe, pipeApply } from './pipeline';
const regexObject = /{([\w|\.|$|#|\\|:|,]*)}/g;
export class OObject {
public static empty: any = null;
public static Format(
format: string,
args: any,
toObject: boolean = false
): string {
try {
retu... |
5cb12c30155589b8df49439911cbbed596a1297f | TypeScript | kyrsanter/kosunka | /src/redux/thunk.ts | 2.640625 | 3 | import {GameService} from "../service/game-service";
import {
dropCardActionCreator,
dropCardToColumnActionCreator,
startGameActionCreator, turnOverStackCardActionCreator
} from "./actions/main";
const service = new GameService();
export const initThunk = () => (dispatch: any) => {
const {stack, rema... |
8e662e884656d6982e42b3f229d99ad71504c59e | TypeScript | Adwisecards/adwise | /adwise-backend/src/app/modules/users/useCases/verifications/getVerification/GetVerificationUseCase.ts | 2.53125 | 3 | import { Types } from "mongoose";
import { IUseCase } from "../../../../../core/models/interfaces/IUseCase";
import { Result } from "../../../../../core/models/Result";
import { UseCaseError } from "../../../../../core/models/UseCaseError";
import { IVerificationRepo } from "../../../repo/verifications/IVerificationRep... |
8f0b986a2a32063ea70d6915a8f5623a5ccdeca2 | TypeScript | senkuu/atypikhouse-api | /src/resolvers/inputs/CriteriaInput.ts | 2.5625 | 3 | import { Field, InputType } from "type-graphql";
import { CriteriaTypes } from "../../entities/Criteria";
@InputType()
export class CreateCriteriaInput {
@Field()
name: string;
@Field({ nullable: true })
additional?: string;
@Field()
criteriaType: CriteriaTypes;
@Field()
isGlobal: boolean;
}
@InputTyp... |
4750d1f05c4b35fed86b1c7cf6f6b461c43391dd | TypeScript | Flamestriken911/alchemy-frontend | /Backend/Components/Ingredient.ts | 3.296875 | 3 | import Effect = require('./Effect');
class Ingredient {
name: string;
id: number;
effects: Effect[];
addedEffects: number; //Number of effect matches added by this ingredient to the current mixture
discoveries: number; //Number of effect discoveries added by this ingredient to the current mixture
... |
60435607126bdf8809b1cf991777a04c316ac3dd | TypeScript | haohello/noteui | /packages/system/src/enhancers/space.ts | 2.671875 | 3 | import { system, get, compose } from './core'
import { Config } from './types'
const defaults = {
space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
}
const isNumber = n => typeof n === 'number' && !isNaN(n)
const getMargin = (n, scale) => {
if (!isNumber(n)) {
return get(scale, n, n)
}
const isNegative = n <... |
d28e3762f56877fc8c3f1e2a33f765334fe07a2c | TypeScript | sgabhart22/stones-frontend | /src/app/shared/board.ts | 3.375 | 3 | import { Cell } from './cell';
export class Board<T> {
rows: number;
columns: number;
cells: Cell<T>[][];
state: any;
constructor(r: number, c: number) {
this.rows = r;
this.columns = c;
this.cells = [];
this.state = {};
for(var i: number = 0; i < this.rows; i++) {
this.cells[i] = []... |
e4c9c1a2c73fe2e6e48251c748537c7ff25323af | TypeScript | Bigomby/toshi.js | /src/request-signer/index.ts | 3.03125 | 3 | import axios, { AxiosRequestConfig } from 'axios';
import { Wallet } from '../wallet';
import { keccak256 } from 'js-sha3';
export type Interceptor = (config: AxiosRequestConfig) => AxiosRequestConfig;
export class RequestSigner {
constructor(private readonly wallet: Wallet) {}
public getInterceptor(): Intercept... |
600b6207e745cb02d001a7e5e0431331a44eff8c | TypeScript | usc-isi-i2/d-repr | /www/app/src/store/types/UIConfiguration.ts | 2.765625 | 3 | export default class UIConfiguration {
public displayMax1Resource: boolean;
constructor(displayMax1Resource: boolean) {
this.displayMax1Resource = displayMax1Resource;
}
public setDisplayMax1Resource(displayMax1Resource: boolean) {
const instance = this.shallowClone();
instance.displayMax1Resource... |
23dd5eb54aafae3383d57097b02d153bfa9b388f | TypeScript | q3spxx/mt2-back | /src/repositories/histories/histories.repository.ts | 2.59375 | 3 | export class HistoriesRepository {
private model: IHistoriesModel;
private mapper: IHistoryDataMapper;
constructor(model: IHistoriesModel, mapper: IHistoryDataMapper) {
this.model = model;
this.mapper = mapper;
}
public async getHistories(): Promise<HistoryDTO[]> {
const d... |
05516637cbb9855efc56108c7875df9ff0eaaef4 | TypeScript | fbuether/WeltraumEindringlinge | /src/actors/Squadron.ts | 2.6875 | 3 | import * as planck from "planck-js";
import * as EventEmitter from "eventemitter3";
import {Random} from "../engine/Random";
import {Actor} from "../engine/Actor";
import {Sprite} from "../engine/components/Sprite";
import {Engine} from "../engine/Engine";
import {Loader} from "../engine/Loader";
import {Vector} from... |
3392fbb6520d18aaa98fea67681406c32812d192 | TypeScript | 1910javareact/Demos | /1Week/garden-book/src/index.ts | 2.984375 | 3 | import express from 'express';
import bodyparser from 'body-parser';
import { gardenRouter } from './routers/garden-router';
import { postRouter } from './routers/post-router';
import { loggingMiddleware } from './middleware/logging-middleware';
import { sessionMiddleware } from './middleware/session-middleware';
impor... |
b92e04bc8c92053ab6a8638d1aa9adc3b4ca603d | TypeScript | maxscott/loan-assignment | /src/loanAssigner.ts | 3.59375 | 4 | import { Loan, Facility, Assignment } from './models';
/**
* Assignment works by selecting the first facility which an Assignment is allowed for.
* Facilities are traversed from low to high interest.
* The assignment model is responsible for validating it's own creation.
*/
export class LoanAssigner {
interestRa... |
ea17dbeaeaa03dd70cfdf91221c39995f39eacc3 | TypeScript | FrankeSa/EA2-Inverted | /L10_Inheritance/L10_Corona/HumanCell/Human_Cell.ts | 2.515625 | 3 | namespace L10_Corona {
export class HumanCell {
position: Vector;
constructor(_position: Vector) {
if (_position)
this.position = _position;
else
this.position = new Vector(0, 0);
}
draw(): void {
le... |
552d8e525dd50a93ec08120af6e4b08c012ed3c8 | TypeScript | l3tnun/EPGStation | /client/src/model/state/recorded/RecordedState.ts | 2.578125 | 3 | import { inject, injectable } from 'inversify';
import * as apid from '../../../../../api';
import IVideoApiModel from '../..//api/video/IVideoApiModel';
import IRecordedApiModel from '../../api/recorded/IRecordedApiModel';
import IRecordedState, { MultipleDeletionOption, SelectedInfo } from './IRecordedState';
import ... |
b66ae6045b267231dec0802b5ec1840319837857 | TypeScript | satyaye/project-reports-action | /project-reports-schemes.ts | 2.703125 | 3 | import {ProjectIssue} from './project-reports-lib'
export function dataFromCard(card: ProjectIssue, filterBy: string, data: string): any {
const fn = module.exports[`get${filterBy}`]
if (!fn) {
throw new Error(`Invalid filter: ${filterBy}`)
}
return fn(card, data)
}
//
// returns last updated using last ... |
921d93b46f987ba5361ae8ee082d8db36a9d0db6 | TypeScript | lizzzp1/tslint-microsoft-contrib | /test-data/NoReservedKeywords/NoReservedKeywordsTestInput-instanceof.ts | 3.078125 | 3 | class SampleInstanceOf3 {
// class variables
private instanceof;
}
// class properties
class SampleInstanceOf4 {
private var;
set instanceof(value) {}
get instanceof() {
return this.var;
}
}
class SampleInstanceOf5 {
instanceof() {} // class methods
}
// interface declarations
int... |
9993073172205ff068ca7d0217718565a22730a8 | TypeScript | allanartuso/order-fox-exercise | /calculator.spec.ts | 2.953125 | 3 | import { calculate, Operation } from "./calculator";
describe("calculator", () => {
it("", () => {
const expected = 2 - 4 / 3 - 5 - 7 + (2 * 20) / 2;
const actual = calculate([
{
operation: Operation.ADDITION,
params: [
2,
[
{
operation: Op... |
9ffc9c75ece884b373a9f3c04e89b04a5e731b94 | TypeScript | sid-code/roguelike | /src/map.ts | 3.25 | 3 | /*
* This code describes a single level of the dungeon, or a "map".
*
* The "generate" function generates a rooms-and-corridors map for
*/
import { PSprng as rng } from "./rng";
import { DungeonOptions } from "./game";
import { CoordPair } from "./interfaces";
export enum Direction {
NORTH, EAST, SOUTH, WEST
}
... |
7458e07096ee5d139e0ff0b46fcfe61c60b113e2 | TypeScript | mtrybus2208/ng-colour-game | /src/app/shared/pipes/mapGameTimeToSec.pipe.ts | 2.578125 | 3 | import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'mapGameTimeToSec'
})
export class MapGameTimeToSecPipe implements PipeTransform {
transform(value: any, revert?: boolean): any {
if (revert === true) {
switch (value) {
case 30: return 'short';
case 60: return... |
223c70482b3e81cfbad2b610ce0a61b82f2eec76 | TypeScript | efueger/sonia-discord | /src/features/node/functions/is-valid-port.spec.ts | 2.828125 | 3 | import { isValidPort } from './is-valid-port';
describe(`isValidPort()`, (): void => {
let port: unknown;
describe(`when the given port is undefined`, (): void => {
beforeEach((): void => {
port = undefined;
});
it(`should return false`, (): void => {
expect.assertions(1);
const re... |
97a590cc5138b1360a7fb3b0c58394a79be319a0 | TypeScript | adonisjs/core | /src/AssetsManager/Drivers/Vite.ts | 2.734375 | 3 | import { AssetsDriverContract } from '@ioc:Adonis/Core/AssetsManager'
import { join } from 'path'
import { BaseDriver } from './Base'
/**
* Resolves entry points and assets path for Vite. Relies
* on the "manifest.json" and "entrypoints.json" files.
*
***************************************************************... |
32116197c3fca66c44d7f397ac1ed8f68df6c263 | TypeScript | Auclown/algo-challenge-ts | /053_find-closest-pair/attempt.ts | 3.6875 | 4 | const findClosestPair = (a: number[], sum: number): number => {
let result: number = -1;
for (let i = 0; i < a.length; i++) {
for (let j = i + 1; j < a.length - 1; j++) {
let current = Math.abs(i - j);
if (a[i] + a[j] == sum) {
if (result == -1 || current < result) {
result = curr... |
dabcc411eb0e552c4985f06caeedc7f0397c7765 | TypeScript | Pirsanth/photo-share | /controllers/commentLikes.ts | 2.640625 | 3 | import { Request, Response } from "express";
import * as model from "../model/manageCommentLikes";
async function addLikes(req: Request, res: Response){
try{
const albumName = req.params["albumName"];
const pictureTitle = req.params["pictureTitle"];
const body: {commentId: string } = req.body;
const... |
0368073bb1adbb6b820a0877ab05b1336ec9e8c1 | TypeScript | jngk2/e-notes.org | /src/client.ts | 2.59375 | 3 | import HTML = marked.Tokens.HTML;
const main = () => {
if ((document.readyState === 'interactive' && Boolean(document.body)) || document.readyState === 'complete') {
go();
} else {
document.addEventListener('DOMContentLoaded', go);
}
}
const clipCopy = async (event: MouseEvent) => {
const code = ((eve... |
cb5b5f3d988af9cd268268786dd7df847b3af652 | TypeScript | arogozine/LinqToTypeScript | /tests/unittests/tests/SumAsync.ts | 2.5625 | 3 | import { asAsync, itAsync, itEnumerableAsync, itParallel } from "../TestHelpers"
describe("sumAsync", () => {
itEnumerableAsync<{ a: number }>("sum Selector", async (asEnumerable) => {
const zooms = await asEnumerable([ { a: 1}, { a: 2 }, {a: 3} ])
.sumAsync(async (x) => x.a)
expect(zoo... |