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 |
|---|---|---|---|---|---|---|
07f201a721761fbc51d2fc5877434ab49c92c1c2 | TypeScript | josephdsbr/user-crud-backend | /src/repositories/implementations/PostgresUserRepository.ts | 2.5625 | 3 | import { Address, User } from "../../entities";
import { User as IUser, UserAttributes, UserModel } from "../../models/IUser";
import { IUpdateUserDTO } from "../../useCases/UpdateUser/UpdateUserDTO";
import { ComparePassword } from "../../utils/HashPasswordUtil";
import { IUserRepository } from "../IUserRepository";
... |
9db8798a7da0b9cfd6d7c17b61080c32732f03a5 | TypeScript | wartoshika/qhun-engine | /src/client/scene/LoadingScreenScene.ts | 2.890625 | 3 | /**
* Copyright (c) 2017 Oliver Warrings <dev@qhun.de>
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
import { Scene } from '../scene/Scene';
import { Game } from '../Game';
/**
* a basic loading screen scene
*/
export class LoadingScreenScene extends Scene {
... |
c0b81a25805fe7539eec8f905d55659bec7f1303 | TypeScript | SafireBlue/text-checker | /src/FindSpaces.ts | 2.546875 | 3 |
import TextCheckResult from "./TextCheckResult";
import { UNonAsciiSpacesPattern, USpacesPattern } from "./Util/Spaces";
// tslint:disable-next-line:max-line-length
export default async function(text: string, options: {excludesAsciiSpace: boolean} = {excludesAsciiSpace: false}): Promise<TextCheckResult[]> {
const... |
9acd38075ae75dd0056a537259b97780fb9e4db4 | TypeScript | rheehot/Nuber-client | /src/modules/place.ts | 2.75 | 3 | import { createAction, createReducer, ActionType } from 'typesafe-actions';
const SET_BOTTOM_MODAL_PLACE_INFO = 'place/SET_BOTTOM_MODAL_PLACE_INFO';
export const actions = {
setBottomModalInfo: createAction(
SET_BOTTOM_MODAL_PLACE_INFO,
(placeInfo: Address) => placeInfo,
)(),
};
export interface AddressI... |
c3a7784992b3f4687ce55ebd7739fac683cf8899 | TypeScript | dom111/flow-free | /src/components/Grid.ts | 2.75 | 3 | import Element, { s } from './Element';
import Path, { Status } from '../lib/Path';
import Cell from './Cell';
import Colour from '../lib/Colour';
import PathFinder from '../lib/PathFinder';
import Point from './Point';
import TouchHighlight, { Status as HighlightStatus } from './TouchHighlight';
export class Grid ext... |
85d73b1aa505eba5d3af7be23124da0af6802706 | TypeScript | donggunn/angular2-typescript-shoping-cart | /app/cart/sum.pipe.spec.ts | 2.59375 | 3 | import {SumPipe} from './sum.pipe';
describe('Testing the sum pipe ',() => {
it('shall return the correct sum for two posetive integers"', () => {
let sumPipe = new SumPipe();
let transformedValue = sumPipe.transform(4,["3"]);
expect(transformedValue).toEqual(12);
});
})
|
5e3d22b07ae6754fc76a14513106bd8dc11c02f0 | TypeScript | SocialGouv/cdtn-admin | /targets/alert-cli/src/diff/get-diff.ts | 2.546875 | 3 | import { GithubDiffFile } from "../APIs/api";
import { simpleGit } from "simple-git";
import { parsePatch } from "diff";
import fs from "fs";
export async function getDiff(
project: string,
fromTag: string,
toTag: string
): Promise<GithubDiffFile[]> {
const repoPath = `/tmp/${project}`;
try {
if (fs.exis... |
098e0164b53040b24aaf3b1f83ac0af7d976d83b | TypeScript | aadeshabichandani/Assignment3_ClickLabs | /src/app/private/profile/profile.component.ts | 2.65625 | 3 | import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { GetDataService } from 'src/app/public/service/get-data.service';
import { dataFormat } from 'src/data-format/dataFormat';
import { PatchDataService } from '../services/patch-data.service';
... |
3d2b71fbbc0a79188c4660613301ce4bdd2d47a3 | TypeScript | rjrodger/nid | /test/nid.test.ts | 2.921875 | 3 | /* Copyright (c) 2013-2022 Richard Rodger, MIT License */
import Nid from '../nid'
let defruns = 100000
function def_id_fmt_ok(id: string) {
return id.match(/^[0-9a-z]{6,6}$/)
}
function fmt_ok(opts: any) {
if (opts.hex) {
opts.alphabet = '0123456789abcdef'
} else if (opts.HEX) {
opts.alphabet = '012... |
78ff29f716955789dc4f10bbbaccbe726d19da3a | TypeScript | GorkaPawel/gym-progress-app | /src/app/shared/store.service.ts | 2.53125 | 3 | import { Injectable } from '@angular/core';
import { Rekord, State, Trening } from "~/app/shared/models";
import { BehaviorSubject } from "rxjs";
@Injectable({
providedIn: 'root',
})
export class StoreService {
private state: State = {
rekordy: [new Rekord("wiosłowanie", '3', '10', '60', 0, new Date())... |
d2d415c719c40f9c5d89409fd086afb5bc305435 | TypeScript | blslade-neumont/agile-html5-game | /src/engine/test/mock-dom.ts | 2.640625 | 3 | /// <reference types="mocha" />
export class MockContext {
constructor(readonly canvas: MockElement) { }
save() { }
restore() { }
translate() { }
rotate() { }
scale() { }
fillRect() { }
fillText() { }
measureText() { return { width: 42 } }
drawImage() { }
}
export class Moc... |
810e27abf85860c293a7ab7ad04d7fbfccb2db0f | TypeScript | rafaelsanzio/ioasys | /src/modules/users/repositories/fakes/FakeUsersRepository.ts | 2.75 | 3 | import { v4 } from 'uuid';
import AppError from '@shared/errors/AppError';
import User from '@modules/users/infra/typeorm/entities/User';
import ICreateUserDTO from '@modules/users/dtos/ICreateUserDTO';
import IUpdateUserDTO from '@modules/users/dtos/IUpdateUserDTO';
import IUsersRepository from '@modules/users/re... |
a8755896b5e462a38e518460275b7c372750c4ab | TypeScript | petterigit/TheSir | /src/utils/ruokaa-utils/generalUtils.ts | 3.296875 | 3 | import path from "path";
import { DayChangeHourUtc } from "./consts";
export const getWeekday = () => {
const date = new Date();
const hour = date.getUTCHours();
let day = date.getUTCDay();
if (hour >= DayChangeHourUtc) day++;
if (day === 7) day = 0;
return day;
};
export const getNextFinnishD... |
a2d9847cc629c8e8a93e1ae670dbeb97f4f9cb66 | TypeScript | Dinkimom/configuration-module | /src/services/AbstractClient.ts | 2.578125 | 3 | /* eslint-disable no-console */
import axios, { AxiosRequestConfig, AxiosError, AxiosResponse } from 'axios'
import { serverEntryPoint } from '../shared/constants/serverEntryPoint'
import { RequestsEnum } from '../shared/enums/RequestsEnum'
import { Entity } from '../shared/types/Entity'
import { notificationSystem } f... |
37d021c224eb3a06e035da32ac6b5be6fbe1eee0 | TypeScript | typecli/framework | /spec/book/value_types_of_arguments_and_options/string.spec.ts | 2.65625 | 3 | import { capture } from '@typescript-plus/stream-capture';
import { Argument, parseSync } from '../../../src';
class Args {
@Argument() s?: string;
}
it('Book - Value Types of Arguments and Options - String', () => {
const captured = capture(process.stdout, (buffer) => {
const parsed = new Args();
parseSy... |
0805ea35a2819479f572f2a2dca7b7064fc1fc08 | TypeScript | tuongvy2679/thuchanh1 | /src/app/bai8/bai8.component.ts | 2.953125 | 3 | import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-bai8',
templateUrl: './bai8.component.html',
styleUrls: ['./bai8.component.css']
})
export class Bai8Component implements OnInit {
constructor() { }
V = 1;
a = 3; b = 6; c = 4; h = 12;
title = "Bài 8: Tính thể tích của hình c... |
1f376377e5b674785f1bc48cb58e6d86258d7af4 | TypeScript | garoqui/Angular-Ngrx | /src/app/reducers/offer.reducer.ts | 2.734375 | 3 | import { Action } from '@ngrx/store'
import { ADDOFFER, CLEANOFFER } from '../actions/offer.action'
import { Offer } from '../model/offer'
interface customAction{
type : string,
payload : string
}
const initialState = {
offer : new Offer("","", [], [])
}
export function offerReducer(state = [i... |
89f1e352947a547b0626178fafc4af09545fd8c6 | TypeScript | tiagowanke/counting-words | /src/app/word-frequency-analyzer/helpers/word-splitter/word-splitter.helper.ts | 3.53125 | 4 | export class WordSplitterHelper {
/**
*
* @returns array of string with each word from the given text.
* Word: A word is represented by a sequence of one
* or more characters between „a‟ and „z‟ or between „A‟ and
* „Z‟). For example “agdfBh”.
*/
static splitTextInWords(text: string): string[] {
... |
ac3fd96d3b7e8a47d42a3a2592dc6fc81a2c657a | TypeScript | smurwafer/backend | /src/routes/story/update.ts | 2.5625 | 3 | import express, { Request, Response, NextFunction } from 'express';
import { requireAuth } from '../../middlewares/require-auth';
import { Story } from '../../models/story';
const Router = express.Router();
Router.put('/api/story/:id', requireAuth, async (req: Request, res: Response, next: NextFunction) => {
try ... |
519126243194ac88c8f18a55c1df116ba5cd716b | TypeScript | ywarezk/angular-beginners-asal | /06-asynchronous-programming/02-promise-example.ts | 3.53125 | 4 | /**
Promise
Promise class
*/
// promise is good here
// ------O--|---------->
// ------X------------->
// promise is not good here
// ----O----O----O----O----O---->
// Promise states
// pending ----> Fullfilled
// pending ----> Rejected
const myFirstPromise: Promise<string> = new Promise((resolve, reject) => {
... |
89474dfb660550bae586f5b48a4f44aef3c54cce | TypeScript | Doned-cmd/OCL1-Proyecto2-201801528 | /src/Clases/Expresiones/Ternario.ts | 2.921875 | 3 | import Errores from "../Ast/Errores";
import Nodo from "../Ast/Nodo";
import Controlador from "../Controlador";
import { Expresion } from "../Interfaces/Expresion";
import { TablaSimbolos } from "../TablaSimbolos/TablaSimbolos";
import { tipo } from "../TablaSimbolos/Tipo";
export default class Ternario implements Ex... |
cdaedde3a4acad0fd8872049cb1109570bf5a0d5 | TypeScript | dmarku/starship-garden | /src/index.ts | 2.703125 | 3 | import {
Engine,
Scene,
ArcRotateCamera,
HemisphericLight,
MeshBuilder,
Vector3,
Matrix,
Color3,
StandardMaterial,
Color4,
TransformNode,
ActionManager,
ExecuteCodeAction
} from "@babylonjs/core";
import { TreeParameters } from "./ITreeParameters";
import { NewTreeGraphics } from "./NewTreeGra... |
93322117b6a1e216458618e391388c31ccdf3ac1 | TypeScript | lvjiaming/pinusTest | /client/assets/Game/40107/script/GameLogic_40107.ts | 3.46875 | 3 | const MASK_COLOR = 0xF0;
const MASK_VALUE = 0x0F;
enum SAME {
KING = 0,
ONE,
TWO,
THREE,
FOUR,
}
export enum TYPE {
ERROR = 0, //错误类型
SINGLE, //单牌类型
DOUBLE, //对牌类型
THREE, //三条类型
SINGLE_LINE, //单连类型
DOUBLE_LINE, ... |
68f742a187e400f837cd807e61ed149a874fbf0e | TypeScript | peterblazejewicz/roosterjs | /packages/roosterjs-editor-dom/lib/utils/applyFormat.ts | 2.625 | 3 | import { DefaultFormat } from 'roosterjs-editor-types';
export default function applyFormat(element: HTMLElement, format: DefaultFormat) {
if (format) {
let elementStyle = element.style;
if (format.fontFamily) {
elementStyle.fontFamily = format.fontFamily;
}
if (format.... |
33d47ad3a38dc26b11cfcce2df57045c0202ff2a | TypeScript | ymonb1291/chrono | /test/substract_hour_test.ts | 3.046875 | 3 | import { Chrono } from "../chrono.ts";
import { expect, Rhum } from "../deps_test.ts";
interface TestCase {
description: string;
startDate: string;
targetDate: string;
param: number | undefined;
}
Rhum.testPlan("substract_hour_test.ts", () => {
Rhum.testSuite("substractHour()", () => {
const testCases: ... |
e431bf2c13620e9a7223084e91040514676a3125 | TypeScript | roots/bud | /sources/@roots/bud-framework/test/extension/decorators/when.test.ts | 2.828125 | 3 | import {describe, expect, it} from 'vitest'
import {when} from '../../../src/extension/decorators/when'
// @ts-ignore
@when(() => true)
class TestClass {}
describe(`when`, () => {
it(`should return a decorator`, async () => {
expect(when(() => true)).toBeInstanceOf(Function)
})
it(`should add a when prope... |
24e82614f21a9b3dedddf2b9383bb36b068b0742 | TypeScript | ismacaulay/code-adventures | /src/toolkit/rendering/buffers/uniformBuffer.ts | 3.015625 | 3 | import { BufferType, type BaseBuffer } from './base';
import { createBuffer } from './common';
export enum UniformType {
Bool = 'bool',
Scalar = 'scalar',
Vec2 = 'vec2',
Vec3 = 'vec3',
Vec4 = 'vec4',
Mat2 = 'mat2',
Mat2x3 = 'mat2x3',
Mat2x4 = 'mat2x4',
Mat3x2 = 'mat3x2',
Mat3 = 'mat3',
Mat3x4 = '... |
31333f10981130764f89f40c26e60e6fbc82a673 | TypeScript | EastSun5566/cc-gram | /__tests__/core.test.ts | 2.734375 | 3 | import {
describe,
beforeEach,
it,
expect,
} from 'vitest';
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { CCgram } from '../src';
import { DEFAULT_FILTERS } from '../src/filters';
describe('Read/Write filter list', (): void => {
let cg: CCgram | null = null;
beforeEach(() => { cg... |
9a53161973c90dde70cf826f1654fba7c989626a | TypeScript | llopez93/logistic-app-frontend | /src/app/core/service/validation-messages.ts | 3.1875 | 3 | import {AbstractControl, FormControl, ValidatorFn} from "@angular/forms";
export class ValidationMessages {
getValidatorErrorMessage(validatorName: string, validatorValue?: any) {
let config = {
'required': 'Este campo es obligatorio.',
'email': 'No es un email valido.',
'invalidPassword': 'Pa... |
6c0ed67d93e0f9616c24f7f25f7d10ef7a1c9470 | TypeScript | SergeyVolynkin/stacks-wallet-web | /src/common/hooks/use-loadable.ts | 2.828125 | 3 | import { useEffect, useState } from 'react';
import { useRecoilValueLoadable, RecoilValue } from 'recoil';
/**
* Wrap a Recoil loadable and add a `value` property, which
* returns the latest value if the loadable is revalidating.
*/
export const useLoadable = <T>(recoilValue: RecoilValue<T>) => {
const loadable =... |
7a82c48032ce7677246bded7d8265a69c3c2ad77 | TypeScript | khusamov/express-typescript | /src/http/status/4xxClientError/MethodNotAllowedStatus.ts | 2.859375 | 3 |
import HttpStatus from '../HttpStatus';
/**
* 405 Method Not Allowed — указанный клиентом метод нельзя применить
* к текущему ресурсу. В ответе сервер должен указать доступные методы
* в заголовке Allow, разделив их запятой. Эту ошибку сервер должен возвращать,
* если метод ему известен, но он не применим имен... |
a69f94814d230c0a110c2c90b9614218720fbdfa | TypeScript | joanllenas/Slaying-a-UI-Antipattern-with-Angular | /src/app/remote-data.ts | 2.90625 | 3 | import { Pipe, PipeTransform } from '@angular/core';
export class NotAsked {}
export class Loading {}
export class Faliure<E> {
constructor(private error: E){}
fold(): E {
return this.error;
}
}
export class Success<T> {
constructor(private value: T){}
fold(): T {
return this.value;
}
}
export typ... |
67f7b16166443a4c13fd8e19d8a207e59a6350c2 | TypeScript | mickeypearce/oradew-vscode | /src/cli/common/globs.ts | 2.6875 | 3 | // const glob = require("fast-glob"); not preserving order
import { sync } from "globby";
import * as multimatch from "multimatch";
import { pipe, compact, uniq, sortBy, identity, map, isEqual } from "lodash/fp";
import { rootPrepend, splitLines } from "./utility";
import { getChangesNotStaged } from "./git";
// Get... |
08a9243705110e1687d0c80a98655fac92fbaba6 | TypeScript | sivakusayan/smogon-usage-fetch | /src/url/UrlBuilder.ts | 2.59375 | 3 | import { isNil } from "lightdash";
import { IFormatData, joinFormatDataLine } from "../parse/smogon/format";
import {
ITimeframeData,
joinTimeframeDataLine
} from "../parse/smogon/timeframe";
import { urlJoin } from "../util/httpUtil";
import { Extension } from "./Extension";
import { SubFolder } from "./SubFol... |
b5e206bc7a7dbf0cc7a74b776f9cfca66d4dd566 | TypeScript | mljs/random | /src/index.ts | 3.40625 | 3 | import XSAdd from 'ml-xsadd';
import { ChoiceOptions } from './Options';
import { RandomNumberGenerator } from './RandomNumberGenerator';
import choice from './choice';
/**
* @classdesc Random class
*/
export default class Random {
private randomGenerator: RandomNumberGenerator;
/**
* @param [seedOrRandom=Ma... |
d8b65992d90843c9a8f7edcff562e079a4d85c2a | TypeScript | gksriharsha/Family-Tree-UI | /src/app/model/Alert.model.ts | 2.765625 | 3 | export class AlertModel{
text:string;
cls:string;
time:number;
constructor(text: string, cls: string, time: number) {
this.text = text;
this.cls = cls;
this.time = time;
}
}
|
904b8a9903723fe889396a950b6cdd0702c67a2b | TypeScript | ArturoDuran0711/LogingServerHTTP | /src/services/user.ts | 2.703125 | 3 | //Para utilizar el decorador @Injectable
import { Injectable } from "@angular/core";
//Para realizar la peticion HTTP
import { Http } from "@angular/http";
@Injectable()
export class UserService{
private http:any; //Se utiliza en esta clase por eso es provado
public user:any; //Guardo datos que me regrese el J... |
f972345f684c44adc4f4c2aadf1beb6a1d89f8d0 | TypeScript | WuLiFang/csheet | /web/src/composables/usePolling.ts | 2.6875 | 3 | import useCleanup from '@/composables/useCleanup';
/**
* @returns polling stop function
*/
export default function usePolling(
update: () => Promise<void> | void,
scheduleNext: (update: () => void) => void = requestAnimationFrame
) {
const { addCleanup } = useCleanup();
let isStopped = false;
const stop =... |
f8e468b88b7565fbe375e88ff8ffd690c3047bbb | TypeScript | andiCR/ShieldBattery | /server/lib/matchmaking/matchmaking-status.ts | 2.703125 | 3 | import { is, Map, Record } from 'immutable'
import { NydusServer } from 'nydus'
import { injectable } from 'tsyringe'
import { MatchmakingType } from '../../../common/matchmaking'
import log from '../logging/logger'
import { getCurrentMatchmakingTime, getMatchmakingSchedule } from '../models/matchmaking-times'
class S... |
b58f25da388ecb1a571bd184f53a37d956ade87c | TypeScript | CambriaSolutions/mdhs-csa | /hosting/analytics/src/store/reducers/filtersReducer.ts | 2.640625 | 3 | import * as actionTypes from '../actions/actionTypes'
const initialState = {
// Set Today filter by default
filterLabel: 'Last 7 days',
dateFilters: {
start: null,
end: null,
},
isCustomDateRange: false,
openDateDialog: false,
colors: [],
mainColor: '#8681A6',
context: '',
timezoneOffset: -... |
1b90cfa6263397145e8f79774bdf62a86bad9ef2 | TypeScript | okraciunas/gs-d06-go-finances-api-v2 | /src/services/CreateTransactionService.ts | 2.875 | 3 | import { getRepository, getCustomRepository } from 'typeorm'
import Category from './../models/Category'
import CreateCategoryService from './CreateCategoryService'
import TransactionsRepository from './../repositories/TransactionsRepository'
import Transaction, { TransactionType } from './../models/Transaction'
imp... |
f575a659351d34a4a6dd5f7b0efeb9554525998f | TypeScript | milesj/interweave | /packages/autolink/src/UrlMatcher.ts | 2.703125 | 3 | import React from 'react';
import { ChildrenNode, Matcher, MatchResponse, Node } from 'interweave';
import { EMAIL_DISTINCT_PATTERN, TOP_LEVEL_TLDS, URL_PATTERN } from './constants';
import { UrlMatcherOptions, UrlProps } from './types';
import { Url } from './Url';
export type UrlMatch = Pick<UrlProps, 'url' | 'urlPa... |
90748df8859048bc595ee7c671aa49fed992c442 | TypeScript | JanUrbanNeto/rentx | /src/modules/cars/useCases/createSpecification/CreateSpecificationUseCase.ts | 2.640625 | 3 | import { inject, injectable } from "tsyringe";
import { ISpecificationsRepository } from "../../../../modules/cars/repositories/ISpecificationsRepository";
import { AppError } from "../../../../errors/AppError";
interface IRequest {
name: string;
description: string;
}
@injectable()
class CreateSpecificationUs... |
06a07dfe19901ed9423b5a8a936c8b10a3544c2b | TypeScript | marcospss/ngrx-shop | /src/app/checkout/reducers/cep.reducer.ts | 2.703125 | 3 | import { CepActions } from './../actions';
import { Address } from '@core/models/address.model';
export interface State {
address: Address;
zipcode: string;
loading: boolean;
error: string;
}
const initialState: State = {
address: null,
zipcode: '',
loading: false,
error: ''
};
export... |
92e0683ef6291112bf731d141bb9563f1c5ab264 | TypeScript | morphatic/v-address-fields | /src/VStateSelect.ts | 2.53125 | 3 | // Imported Types
/// <reference path="../node_modules/vuetify/src/globals.d.ts" />
import Vue from 'vue'
// 3rd Party Libs
import { UsaStates } from 'usa-states'
// Styles
import './VStateSelect.sass'
/**
* Import the Vuetify components you plan to extend here.
*/
// @ts-ignore
import { VAutocomplete } from 'vuet... |
2cb741893be4aa57d851f2656a247963c67e27cd | TypeScript | DTURoadrunners/VCFRONTEND | /src/app/service/auth.service.ts | 2.609375 | 3 | import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { logging } from 'selenium-webdriver';
import { USERS } from '../mock/mock-users';
import { User } from "../models/user";
import { CAMPUSNETUSERS } from "../mock/mock-camp... |
a0bfa2dc1bc7acb66419df4a628ee7ec4b35ceb8 | TypeScript | ababakhanlou/the-shopping-centre | /src/types.ts | 2.625 | 3 | export interface Basket {
item: string;
price: number;
qty: number;
}
export interface State {
selectedCategory: string;
basket: Basket[];
}
export interface Action {
type: string;
payload: any;
}
export interface Stock {
brand: string;
model: string;
item: string;
price: number;
displayName:... |
f9363f2590e69a7823a6c20915d99e49976942c5 | TypeScript | rafaelmarinhos/calendar-plan | /src/app/model/calendar-period.ts | 2.5625 | 3 | export const PERIOD_TYPE_INFO = {
liturgical: { name: 'Litúrgico', symbol: '△', type: 'liturgical' },
catechetical: { name: 'Catequético', symbol: '◇', type: 'catechetical' },
civil: { name: 'Civil', symbol: '◎', type: 'civil' }
};
export const LITURGICAL_PERIODS = {
advent: { name: 'Tempo do... |
5f170ae933d86cd26a032080daaf90cd651ddff3 | TypeScript | kabeleced77/foxfm2 | /src/Common/Toolkit/SplitStrings.ts | 3.359375 | 3 | import { SplitStringToNumbers } from './SplitString';
import { IValues, Values } from './Values';
export interface ISplitStrings<T1, T2> {
firstValues(): IValues<T1>;
secondValues(): IValues<T2>;
}
export class SplitStringsToNumbers implements ISplitStrings<Number, Number> {
private readonly strings: IValues<St... |
ce96e78070ebec4b58614f6ff0b1dc0dbfac7892 | TypeScript | dejametecuento/dejametecuento-site | /lib/hooks/use-media-queries.ts | 2.65625 | 3 | import { useState, useEffect } from 'react'
const useMediaQuery = (width: number) => {
const [targetReached, setTargetReached] = useState(false)
useEffect(() => {
const updateTarget = (e: MediaQueryListEvent) => {
if (e.matches) {
setTargetReached(true)
} else {
setTargetReached(fa... |
748325dc0c55b5a338c35457613cba5e70ad4fa1 | TypeScript | CatchoftheDay/coding101 | /src/reducers.ts | 2.625 | 3 | import { AnyAction, combineReducers } from "redux";
import { createReducer } from "deox";
import runnerReducer, { addMaze, resetState } from "./services/runner/reducers";
import { Stage, TutorialState } from "./types";
import { addAchievement, addKey, advanceTo } from "./actions";
const mazePropsByState = {
[Stage.A... |
fad8477d4bb81d18360b838a31b5de564d0a8533 | TypeScript | rolik-deni/nestjs-crud | /src/users/entities/user.entity.ts | 2.734375 | 3 | import {
BaseEntity,
Column,
CreateDateColumn,
DeleteDateColumn,
Entity,
PrimaryGeneratedColumn,
} from 'typeorm';
@Entity({ name: 'users' })
export class User extends BaseEntity {
@PrimaryGeneratedColumn()
id: number;
@Column()
name: string;
@Column()
email: string;
@Column()
password: ... |
d07e2403ce9c3eed315a76f530be60a27d86e72d | TypeScript | JanithaSampathBandara/Ramping-Up-With-Krish | /nestjs-angular-algorithm-exercises/backend-nestjs/algorithm-service/src/algorithms/algorithms.service.ts | 3.671875 | 4 | import { Injectable } from '@nestjs/common';
@Injectable()
export class AlgorithmsService {
isAnagram(word1: String, word2: String): boolean {
word1 = word1.toLowerCase();
word2 = word2.toLowerCase();
//Check whether both words have same no of letters
if (word1.length === wor... |
0f1087f89565c2c8230cc21e12afec75b0a4d1e0 | TypeScript | bagbag/tstdl | /base/source/injector/interfaces.ts | 3.046875 | 3 | import type { Type } from '#/types.js';
import type { InjectionToken } from './token.js';
export const resolveArgumentType: unique symbol = Symbol('resolveArgumentType');
export const afterResolve: unique symbol = Symbol('after resolve');
export type ResolveArgumentType = typeof resolveArgumentType;
export type Reso... |
20b376c939d1df7cbbaad787265772dcea2c92d1 | TypeScript | WaywardGame/types | /definitions/game/ui/screen/screens/game/static/stats/component/StatusEffects.d.ts | 2.546875 | 3 | /*!
* Copyright 2011-2023 Unlok
* https://www.unlok.ca
*
* Credits & Thanks:
* https://www.unlok.ca/credits-thanks/
*
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
* ... |
7d39197a65e9706b4aea7747f4b55286dad909a0 | TypeScript | gustavoGarrido/angularClaseLunMierc | /src/app/pipes/pipe/estados.pipe.ts | 2.578125 | 3 | import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'estados'
})
export class EstadosPipe implements PipeTransform {
transform(value:number): string {
switch (value) {
case 0:
return "ANULADO"
break;
case 1:
return "ACTIVO"
default:
return ... |
d5e6d5eb138d103f930ad0a31727b0236951d95b | TypeScript | bpiggin/mindful-timer-app | /src/components/DayStreak/helpers.ts | 3.171875 | 3 | import AsyncStorage from '@react-native-community/async-storage';
const getStreakData = async () => {
const lastDay = await AsyncStorage.getItem('@last_Day');
return {
count: Number(await AsyncStorage.getItem('@streak_Count')),
lastDay: lastDay ? new Date(String(lastDay)) : null,
};
};
const updateStrea... |
0c16ad790efb14487a4958e2fb24f5c59d431777 | TypeScript | pcapelo/EightBittr | /packages/timehandlr/src/types.ts | 3.71875 | 4 | /**
* Lookup of current events, mapping times to all associated events.
*/
export interface CurrentEvents {
[i: number]: TimeEventLike[];
}
/**
* General-purpose Function for events.
*
* @param args Any arguments, passed through a TimeHandlr.
* @returns Anyactor truthy to stop repetition.
*/
export type E... |
1eae1543edc4e784c434615a83150a04f2723dfa | TypeScript | trustedtomato/font-awesome-svgs | /src/lib/chunkArray.ts | 3.390625 | 3 | export function chunkArray<T> (array: T[], chunkLength: number): T[][] {
const newArray: T[][] = []
for (let i = 0; i < array.length; i += chunkLength) {
newArray.push(array.slice(i, i + chunkLength))
}
return newArray
}
|
b0f52348dbf9d6fc3ee07943dd850864bd479ea6 | TypeScript | Mai-HealthTracker/WebApp | /src/app/home/meal-tracker-item/meal/meal.component.ts | 2.53125 | 3 | import { Input } from '@angular/core';
import { Component, OnInit, OnChanges } from '@angular/core';
import { Icon } from 'src/app/model/records/icon';
@Component({
selector: 'app-meal',
templateUrl: './meal.component.html',
styleUrls: ['./meal.component.css']
})
export class MealComponent implements OnInit {
@In... |
2952ac3d4adde9475bfd7d3444ecc31d73313181 | TypeScript | ThaNarie/AutoListing | /source/inc/script/lib/jquery/jquery.d.ts | 2.515625 | 3 | /* *****************************************************************************
Copyright (c) Microsoft Corporation. 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://w... |
20cbe06de2d3c2385dbe65edf1a39fa7bfdd70ae | TypeScript | nii-gakunin-cloud/sinetstream | /docs/tutorial-android/sinetstreamhelper-tutorial-container/chart/src/store/chart-state-type.ts | 2.546875 | 3 | export type TypeChart = 'line' | 'bar';
export interface ChartOption {
id: number;
title: string;
chart: TypeChart;
sensor: string;
color?: string;
}
|
986bce76f8a19c8466a1dd2b53d8e650230498f1 | TypeScript | RaduMilici/pulsar-game | /src/util/findElement.ts | 2.65625 | 3 | const findElement = (selector: string): HTMLElement | null => {
const container: HTMLElement | null = document.querySelector(selector);
if (container === null) {
console.error(`Can't find container with selector ${selector}`);
}
return container;
};
export default findElement;
|
7e31631b48afdb56485d808338243ee85fc22889 | TypeScript | OmniCar/tfetch | /src/api.ts | 3.4375 | 3 | export interface IJsonStatus<T, E> {
data?: T
errorData?: E
networkError?: NetworkError
statusCode?: number
}
export type NetworkError = 'TIMEOUT' | 'OTHER'
export type HttpType = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'
export interface IExtraHeader {
key: string
value: string
}
export interface IRe... |
0289b894f2e23fbce0f609b56c77457c55574268 | TypeScript | kpritam/gateway-tsclient | /test/params/Key.test.ts | 2.6875 | 3 | import * as TestData from 'jsons/keys.json'
import {
AltAzCoord,
CometCoord,
EqCoord,
MinorPlanetCoord,
SolarSystemCoord,
Key,
Parameter
} from 'models'
import * as Keys from 'models/params/Key'
const stringify = (param: Parameter<Key>) => JSON.stringify(param.toJSON()[param.keyTag])
// ======== Simple ... |
55a992f00284e4d6017840f30f1af8d4b9cb27de | TypeScript | Keynesking/blog | /TS/base/dist/interface1.d.ts | 2.90625 | 3 | interface LabelledValue {
label: string;
}
declare function printLabel(labelledObj: LabelledValue): void;
declare let myObj: {
size: number;
label: string;
};
interface SearchFunc {
(source: string, subString: string): boolean;
}
declare let mySearch: SearchFunc;
interface Person1 {
name: string;
... |
1a44b5b38a68e1eaac3072a4b590ae6fb71417f3 | TypeScript | AmeetGill/Trison | /test/Tunnels/ConditionalTunnel.ts | 2.84375 | 3 | import ReadOnlyMessage from "../../src/Messages/ReadOnlyMessage";
import Message from "../../src/Messages/Message";
import {describe,it} from "mocha"
import * as chai from "chai";
import chaiExclude from 'chai-exclude';
import Queue from "../../src/Queue";
import {NO_CONDITIONAL_TUNNEL_FOUND_MESSAGE} from "../../src/Ut... |
fe6dbbb55d19b9e6fd37ea3ecc6b476e96ec2c98 | TypeScript | ukstv/js-ceramic | /packages/key-did-resolver/src/nist_weierstrass_common.ts | 3.234375 | 3 | // Brent Shambaugh <brent.shambaugh@gmail.com>. 2021.
import * as u8a from 'uint8arrays'
import { base64url } from 'multiformats/bases/base64'
/**
* x,y point as a BigInt (requires at least ES2020)
* For BigInt see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt
*/
inter... |
48482b88b7517b5f2aac8a2038f9d35391e732b4 | TypeScript | maolaya15/Biblioteca | /src/app/components/crear-libro/crear-libro.component.ts | 2.515625 | 3 | import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { Book } from 'src/app/models/book.model';
import { BookService } from 'src/app/service/book.service';
import Swal from 'sweetalert2';
import { DashboardComponent } from '../dashboard/dashboard.component';
/**
* Compone... |
cebbc20350e0bf815b79d3a4009295501393bf38 | TypeScript | travis-lxu/Graphics-II | /Lab4/lib/objects/EdgeTableElement.ts | 2.796875 | 3 | import { Vector3d } from "../math/Vector3d";
/*
* @Author: GXwar
* @Date: 2019-02-17 21:37:10
* @Last Modified by: GXwar
* @Last Modified time: 2019-05-09 19:05:45
*/
class EdgeTableElement {
yStart: number;
yMax: number;
xStart: number;
delta: number;
zStart: number;
zDeltaToY: number;
normalStart... |
b92445fda57da52ac12783d87e6b448f77c83e55 | TypeScript | DKurilo/hackerrank | /leetcode/src/construct-target-array-with-multiple-sums/solution.ts | 3.625 | 4 | const constructTargetArrayWithMultipleSums = () => {
const isPossible = (target: number[]): boolean => {
// eslint-disable-next-line no-constant-condition
while (true) {
let maxIndex;
let max = 0;
let sum = 0;
for (let i = 0; i < target.length; i += 1) {
if (target[i] > max) {
... |
6b2a3c20a635ef82622ec063bdb975d9bda8cdb7 | TypeScript | frainmaster/mintbean_musichacks_synthesizer | /Tone.js-dev/Tone/component/channel/Split.ts | 3 | 3 | import { ToneAudioNode, ToneAudioNodeOptions } from "../../core/context/ToneAudioNode";
import { optionsFromArguments } from "../../core/util/Defaults";
interface SplitOptions extends ToneAudioNodeOptions {
channels: number;
}
/**
* Split splits an incoming signal into the number of given channels.
*
* @example
... |
efb7ebb4da2f26cb9143bb9ed89a8a02fb9e0e8b | TypeScript | yvelianyk/ipfinder-rest-server | /handlers/getCurrentUser.ts | 2.671875 | 3 | import { Response, Request } from "express";
import { IUser } from '../models/users';
import * as _ from 'underscore';
import { AccessRoles } from '../services/ac.service';
interface RequestWithUser extends Request {
user: string;
}
const getCurrentUser = function(request: RequestWithUser, response: Response){
... |
d7b1963579aa7727277dfc2fb95d57da053920dc | TypeScript | wolffman122/Screeps | /src/processTypes/buildingProcesses/towerRepair.ts | 2.578125 | 3 | import {Process} from '../../os/process'
export class TowerRepairProcess extends Process
{
type = 'tr';
metaData: TowerRepairProcessMetaData;
run()
{
if(!Game.rooms[this.metaData.roomName])
{
this.completed = true;
return;
}
if(Game.rooms[this.metaData.roomName]?.find(FIND_HOSTILE... |
0bc366b9aa52faa98aae418e3107b3076f43e26e | TypeScript | serggin/rpn_calc | /src/custom-inputs/RPN.ts | 3.8125 | 4 | /**
* Arithmetic formula calculator
* Based on Reverse Polish notation Algorithm
* See https://en.wikipedia.org/wiki/Reverse_Polish_notation
*
* Restictions:
* Allowed numbers, operators "+", "-", "*", "/" (included infix "+", "-") and parentheses
*
* Usage:
* const rpn = new RPN();
* const formula = "-2*(3+4... |
0c87b3bd7263a5db3446cca71e734b208a8ec2ad | TypeScript | pfych/kbinxml-ts | /src/sixBit/sixbit.ts | 3.296875 | 3 | import { bigintToBuf } from "bigint-conversion";
// TODO: Make this more readable, It functions but it could be confusing.
const CHAR_MAP = "0123456789:ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz";
const BYTE_MAP: { [key: string]: number } = CHAR_MAP.split("").reduce(
(acc: Record<string, number>, val) => ... |
ec9b6e3d92d0cb50cbcb833034e9613d45abcd9e | TypeScript | yzessta/storefront | /src/braintree.ts | 2.53125 | 3 | export async function createClient(paymentClientToken?: string) {
const braintree = await import('braintree-web');
return braintree.client.create({
authorization: paymentClientToken ?? '',
});
}
type CreditCardData = {
billingAddress: {
postalCode?: string;
};
cvv: string;
expirationDate: string... |
7d2e5a94914eccdc46243d6e2076a6e4818c909f | TypeScript | robert-harbison/super-validator | /lib/validators/Equals.ts | 2.546875 | 3 | import { createValidator } from '..'
import { config } from '../core/Config'
import { ErrorReturnTypes, ValidatorFunction } from '../core/Validator'
const equals = (toEqual: unknown, strict = true, customMessage?: string): ValidatorFunction =>
createValidator((fieldKey: string, value: unknown): ErrorReturnTypes => {
... |
84d11d2f468b0715387807b046df566deeec0d32 | TypeScript | boa070270/engine-model | /src/playground/tty-properties.ts | 2.734375 | 3 | import {ReadStream, WriteStream} from 'tty';
import {EngineModel, EngineProperty, EnginePropertyFunc, PropertySource} from "engine-model";
import {EMPTY, Observable, of, Subscription} from "rxjs";
import {propertyNamesToPropertyArrays} from "../model/properties";
const rs: ReadStream = process.stdin;
const ws: WriteSt... |
5ba82b3a18b68e015221376c09e9db8e43c80c93 | TypeScript | validated-changeset/validated-changeset | /src/utils/get-deep.ts | 3.0625 | 3 | import { isChange, getChangeValue } from '../-private/change';
/**
* Handles both single key or nested string keys ('person.name')
*
* @method getDeep
*/
export default function getDeep<T extends Record<string, any>>(
root: T,
path: string | string[]
): any {
let obj: T = root;
if (path.indexOf('.') === -... |
98feb956a249a971c01a99e9d5ac041d178ef070 | TypeScript | EagleLizard/FactorySimulator | /Component/GlassComponent.ts | 2.609375 | 3 | import {
Component,
IMaterial,
Glass,
MaterialStore
} from '../I';
export class GlassComponent extends Component{
input:IMaterial[];
output:Glass;
constructor(){
super(
'GlassComponent',
{ name: 'Silica', units: 9 },
{ name: 'Lime', units: 1}
);
}
process(store:MaterialStore... |
c2f52f6ba51af829e7cd67a84395ed05b39aaed0 | TypeScript | diegoncollazo/UTN | /Laboratorio III/Cursada/Laboratorio III/PP.Práctica/Televisores/FRONTEND/producto.ts | 3.25 | 3 | namespace Entidades {
export class Producto {
//atributos
codigo: number;
marca: string;
precio: number;
//cosntructor que reciba los tres
public constructor(codigo: number, marca: string, precio: number) {
this.codigo = codigo;
this.marca =... |
03197e4945473e1f8311c4de8f63393a5c6f5cf0 | TypeScript | kingokeke/farmunity | /server/src/models/UserModel.ts | 2.640625 | 3 | // USER MODEL FILE
import { User as UserType } from '../typings/index';
import mongoose from 'mongoose';
import { hash } from 'bcryptjs';
const userSchema = new mongoose.Schema(
{
firstName: String,
lastName: String,
email: String,
phone: String,
password: String,
role: String,
streetAdd... |
4a7db5931ceadab0bf9fb1c133430b738636b1c0 | TypeScript | radko94/algorithms-and-data-structures | /sort/sort.ts | 3.5 | 4 | exports.bubbleSort = (array: number[], arrayLength: number) => {
let firstIndex: number;
let secondIndex: number;
let swapped: boolean;
let temporaryValue: number;
for (firstIndex = 0; firstIndex < (arrayLength - 1); firstIndex++) {
swapped = false;
for (secondIndex = 0; secondInd... |
faad1452a561021ffe38e98ba6a91172eab945a6 | TypeScript | daviseford/aos-reminders | /src/factions/ogor_mawtribes/artifacts.ts | 2.703125 | 3 | import { tagAs } from 'factions/metatagger'
import {
CHARGE_PHASE,
COMBAT_PHASE,
END_OF_COMBAT_PHASE,
MOVEMENT_PHASE,
SHOOTING_PHASE,
START_OF_ANY_PHASE,
} from 'types/phases'
const Artifacts = {
//GUTBUSTERS HERO only.
'Gruesome Trophy Rack': {
effects: [
{
name: `Gruesome Trophy Rac... |
86bc5bcb304cd40ed5970fa7325b926503062482 | TypeScript | jashieh/typescript_practice | /typescript-fundamentals/challenges/dict/src/index.ts | 3.734375 | 4 | // <T> captures the generic type of the variable/function
// allowing this type to be used elsewhere to make the
// function more generic
export type Dict<T> = {
[k: string]: T | undefined;
};
// Array.prototype.map, but for Dict
export function mapDict<T, S>(
dict: Dict<T>,
fn: (arg: T, idx: number) => S
): ... |
f08c88f62f1a0ecbbe85487879513bb81e98608f | TypeScript | renavigation2/renavigation2 | /packages/history/src/typings/Events.ts | 2.6875 | 3 | export type Events<F> = {
length: number
push: (fn: F) => () => void
call: (arg: any) => void
}
|
b71afcc61c7d32da76a6b0db596eea3a0052672f | TypeScript | abhishekkagrawal/angular_js | /typescript/ClassDemo.ts | 3.453125 | 3 | class Associate{
associateId:any;
firstName:string;
lastName:string;
basicSalary:number;
hra:number;
ta:number;
da:number;
totalSalary:number;
constructor(associatedId:number,firstName:string,lastName:string,basicSalary:number){
this.associateId=associatedId;
thi... |
c10920f942a327110f537995733bfd6491535d50 | TypeScript | alexisbertholom/node-basic-scheduler | /src/index.ts | 3.28125 | 3 | interface EventData<T>
{
timestamp: number,
payload: T,
};
type ActionF<T> = (payload: T) => any;
type EventGetterF<T> = () => Promise<EventData<T> | null>;
export class Scheduler<PayloadT>
{
private _timer: NodeJS.Timer | null;
constructor(
private action: ActionF<PayloadT>,
private getNextEvent: Ev... |
4e326fd62cc597cd13cabc43e29ff6f407bfa5b4 | TypeScript | T4rk1n/dazzler | /src/icons/ts/types.d.ts | 2.796875 | 3 | type IconPackDict = {
[name: string]: IconPackType;
};
type IconPackType = {
url: string;
name: string;
}
type IconContextType = {
packs: IconPackDict;
addPack: (pack: IconPackType) => void;
isLoaded: (packName: string) => boolean;
}
|
3b2fdd761056aa41bafd45dcd1e6f528e9f542d1 | TypeScript | alufers/openscad-parser | /src/CodeFile.ts | 2.984375 | 3 | import * as fs from "fs";
import * as path from "path";
export default class CodeFile {
constructor(public path: string, public code: string) {}
get filename() {
return path.basename(this.path);
}
/**
* Loads an openscad file from the filesystem.
*/
static async load(pathToLoad: string): Promise<... |
aa2b28a352843832a9ddd78dd8d8c9f60a4aaf35 | TypeScript | yanche/compiler | /src/utility/number/idgen.ts | 2.921875 | 3 |
import { isInt } from "../validate";
export class IdGen {
private _cur: number;
constructor(start: number = 0) {
if (!isInt(start)) {
throw new Error(`input to IdGen must be an integer`);
}
this._cur = start;
}
public next(): number {
return this._cur++;
... |
6db74e2f850a3189862441dc96c90fa70af48e79 | TypeScript | adam-rolain/DevBuildLab_13_2 | /Inventory.ts | 3.15625 | 3 | import { Product } from "./Products";
interface InventoryItem {
product: Product;
quantity: number;
};
let inventory: InventoryItem[] = [
{ product: { name: 'motor', price: 10.00 }, quantity: 10 },
{ product: { name: 'sensor', price: 12.50 }, quantity: 4 },
{ product: { name: 'LED', price: 1.00 },... |
9fe0b7b9862b6a1d3bea03e743540a57dc2e7f9c | TypeScript | camizzilla/blog | /src/app/shared/components/canvas/services/canvas.service.ts | 2.578125 | 3 | import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class CanvasService {
start = false;
animationFrame;
drawRect(ctx, { color, x, y, w, h }) {
ctx.fillStyle = color;
ctx.fillRect(x, y, w, h);
}
drawText(ctx, WIDTH, HEIGHT, { font, color, align, text }) {
ct... |
358c86aa589a92eadd2fe993e6ebd5dafa4f701b | TypeScript | willemneal/assemblyscript | /lib/parse/tests/index.ts | 2.625 | 3 | import * as fs from "fs";
import * as assert from "assert";
import {
Type,
SectionId,
ExternalKind,
WasmParser
} from "../src";
type CompileError = WebAssembly.CompileError;
[ "../build/test.wasm",
// "../build/index.wasm",
// "libm.wasm"
].forEach((filename: string): void => {
const binary: Uint8Arra... |
c200ea7815d0c22657f876d99bb373e877b49d8d | TypeScript | jovotech/jovo-framework | /platforms/platform-facebookmessenger/src/output/decorators/validation/CastedMaxLength.ts | 2.734375 | 3 | import { registerDecorator, ValidationOptions } from '@jovotech/output';
export function CastedMaxLength(max: number, options?: ValidationOptions): PropertyDecorator {
return function (object, propertyKey) {
registerDecorator({
name: 'castedMaxLength',
target: object.constructor,
propertyName: ... |
f749d3ad4d9555946bbc0fc2a1e6506b5f1bfc23 | TypeScript | polynote/polynote | /polynote-frontend/polynote/ui/component/leftpane.ts | 2.625 | 3 | import {div, h2, TagElement} from "../tags";
import {LeftMenuSections, Pane} from "../layout/splitview";
import {
LeftBarPreferences,
LeftBarPrefsHandler,
StickyLeftBarPreferences, ViewPreferences,
ViewPrefsHandler
} from "../../state/preferences";
import {Disposable, setProperty, setValue, StateHandler... |
2d9a8d019cd49486754bb74aa41933acd0ab3e7a | TypeScript | binary-com/SmartCharts | /src/components/ui/Helper.ts | 3.109375 | 3 | import Context from './Context';
/**
* Abstract class for UI Helpers
* @name CIQ.UI.Helper
* @constructor
*/
class Helper {
context: Context | null;
injections: any;
node: HTMLElement;
constructor(node: HTMLElement, context: Context | null) {
this.node = node;
this.context = context... |
73ca7db29e5a4f91fadb0dfb87c5f98934fb47be | TypeScript | kefniark/Coopa | /tests/events/onchange.test.ts | 2.78125 | 3 | /// <reference types="jest" />
import { onChange } from "../../src"
test("on-change", () => {
const a: any = {}
const proxy = onChange(a, (prop, val, prev) => {
console.log("on-change", prop, val, prev)
})
proxy.a = 2
proxy.a = 3
proxy.b = { b: 1, c: 4 }
proxy.b.c = 5
proxy.b.d = { a: 1, b: 2 }
proxy.b.d.a... |
f0c01468b8521a98c3a4a4f460872de64af981ef | TypeScript | luismdavid/examen-final-moviles | /src/app/home/home.page.ts | 2.75 | 3 | import { Component } from '@angular/core';
@Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
})
export class HomePage {
array = {
0: { id: 72, name: "David Beckham" },
1: {
0: [
{ id: 11, name: "Brad Pitt" },
{ id: 1, name: "Alexandra... |