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 |
|---|---|---|---|---|---|---|
46cd2415d3fc2c2d2f363dcb1c909961062c6fe0 | TypeScript | mattmazzola/interview-questions | /src/pluralsight/pimatch.ts | 3.46875 | 3 | const pi = 314
const minLength = 3
const minValue = Math.pow(10, minLength - 1)
const maxLength = 12
const maxValue = Math.pow(10, maxLength - 1)
export const piMatch = (n: number): number => {
if (n < 100) {
return 0
}
if (n > maxValue) {
throw new Error(`Invalid number. Number must be le... |
69e636c3a28b2138f6bc5f6f23d83fac5a4cc15b | TypeScript | BloomBooks/comical-js | /src/lineTail.ts | 2.59375 | 3 | import { Tail } from "./tail";
import paper = require("paper");
import { TailSpec } from "./bubbleSpec";
import { Bubble } from "./bubble";
import { Comical } from "./comical";
export class LineTail extends Tail {
private tailWidth: number = 1;
public constructor(
root: paper.Point,
tip: paper... |
0aac81f2a4607fa2ea726a725d50959744a8ee77 | TypeScript | giacomette/super-react-hook-form | /my-app/src/@form/utils/rules/__tests__/max.test.ts | 3.0625 | 3 | import { max } from "../max";
describe("#max()", () => {
test("Deve formatar um retorno de validação padrão caso uma mensagem customizada não seja informada", () => {
const expected = {
value: "10",
message: "O valor máximo para Número de telefone é 10.",
};
const result = max("10", "Número ... |
cc653a08ab7ea258732a502c87e9f9081a940f98 | TypeScript | thislooksfun/GMTC-Operator | /src/utils/text/greet.ts | 2.671875 | 3 | import { GuildMember } from 'discord.js';
import oneOf from '../oneOf';
const greetings = [
['Howdy', '!'],
['Hey there', '!'],
['Sah', '.'],
['Heya', '.'],
["What's up", '?'],
['Hello', '!'],
['Hi', '!'],
['Hi there', '!'],
['How do you do', '?'],
['Howdy do', '!'],
["What's poppin'", '?!?!'],
['Cheers', ... |
495b403f2a06ccfc8d06a9fb2ec4f5ad66fe975a | TypeScript | turkaytunc/rehber-frontend | /src/types/PersonBuilder.ts | 3.046875 | 3 | import { Person } from './Person';
export class PersonBuilder {
person: Person;
constructor(firstname: string, phone_number: string) {
this.person = new Person(firstname, phone_number);
}
setPersonId(personId: string): PersonBuilder {
this.person.person_id = personId;
return this;
}
setFirstn... |
3e0083a8e6ae994181f68d7c8a1c88886b6325fa | TypeScript | JestVA/daily-quest | /Typescript/holistic/6-guards-and-extreme-types.ts | 4.25 | 4 | import { HasEmail } from "./1-basics";
// top types ( types that can hold any value )
let myAnyValue : any = 34;
let myUnknownValue : unknown = 'Hello, unknown';
myAnyValue.foo.bar.nar; // you can do anything with any
//myUnknownValue.isIt; // prop does not exist on type unknown
async function logAny(p: Promise<any... |
b0c2c0544ffc73bd9812b11e27291f063252986e | TypeScript | xldc/JavaScript-test | /DictionaryTest/lib/Dictionary.ts | 3.265625 | 3 | import {defaultToString} from "../../utils/Util.ts";
import {ValuePair} from "../../utils/dictionary-list-models.ts";
interface toStrFnType {
(item: string): string;
}
interface tableType {
[propName: string]: any;
}
interface callbackFnType {
(key: string,value: any): any;
}
export default class Dicti... |
58831e41724179da36dc239e9ffc1033eb9e1bba | TypeScript | gabrielVjfl/softbarber | /backendbarber/src/controllers/LatLng.ts | 2.78125 | 3 | import express, { Request, Response } from 'express'
const Model = require('../database/models')
const Days = Model.Days
import dayjs from 'dayjs'
import datefns from 'date-fns'
class Teste {
async testando(Request, Response) {
try {
//let horaminha = '09:45:00'
const {
horaminha
} ... |
363943c11fe6680f57baabfc88aca33cd807a0f2 | TypeScript | Srini-py/Hotel_Expense_Tracker | /src/app/logs/log.model.ts | 2.5625 | 3 | export class Log {
constructor(
public id: string,
public department: 'Front Desk Department' | 'Purchase Department' | 'Human Resource Department' | 'Sales & Marketing Department',
public logType: 'Expense' | 'Income',
public entry: string,
public value: number,
public date: Date
) { }
}
|
b1a66b1d146c399cc65e91e0e09c44118e5eefb8 | TypeScript | ChromeDevTools/devtools-frontend | /front_end/third_party/diff/DiffWrapper.ts | 2.796875 | 3 | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import * as Common from '../../core/common/common.js';
declare global {
/* eslint-disable @typescript-eslint/naming-convention */
class diff_match_pa... |
46f06cc170d2e9f6ea708f51598eba3e1c45733d | TypeScript | raghunathsandilya/smartmarkers-react | /src/models/Bundle.ts | 2.578125 | 3 | import { IResource } from './Resource'
import { IIdentifier } from './Identifier'
import { IBackboneElement } from './BackboneElement'
import { ISignature } from './Signature'
export enum BundleType {
Document = 'document',
Message = 'message',
Transaction = 'transaction',
TransactionResponse = 'transa... |
7213e4ee88eef9915f8421c20cc4e4bf95b693bf | TypeScript | Jacks128/tytusx | /20211SVAC/G16/app/Clases/AST/Simbolo.ts | 2.71875 | 3 | import Valor from "./Valor";
export default class Simbolo {
Nombre: string;
Valor: Valor;
Padre: string;
Linea: number;
Columna: number;
Posicion: number;
constructor(Nombre: string, Valor: Valor, Padre: string, Linea: number, Columna: number, Posicion: number) {
this.Nombre = Nombre;
this.Valo... |
bb264b6444b641b7f716cfdf332d4201193f2780 | TypeScript | void-aurora/markdown | /packages/markdown-plugin-highlight/src/index.ts | 2.59375 | 3 | /* eslint-disable @typescript-eslint/strict-boolean-expressions */
/* eslint-disable no-param-reassign */
import { Token, MarkdownPlugin } from '@void-aurora/markdown';
import { render } from './prism';
import { normalizeInfo } from './normalize';
// hljsDefineVue(hljs);
export interface PluginHighlightOptions {
/*... |
89685671015dfc3484c3934840c641a1acd00f0b | TypeScript | Veetaha/basic-ts-nodejs-template | /backend/modules/discord/discord-handler.interfaces.ts | 3.078125 | 3 | import Discord from 'discord.js';
export interface DiscordCmdHandlerFnCtx {
/** Command that this handler was invoked with. */
readonly cmd: string;
/** Original discord message that was received. */
readonly msg: Discord.Message;
/**
* Array of positional parameters that were forwa... |
7e8a444cb09e5bdde44cdabeb02117bfd10cd2aa | TypeScript | lsegurado/poc-jobsity | /src/classes/Reminder.ts | 2.6875 | 3 | import { City, Province } from "../apiHelpers/Types";
export default class Reminder {
public title: string;
public date: Date;
public color: string;
public id?: number;
public city?: City | null;
public province?: Province | null;
constructor(date: Date = new Date()) {
this.title =... |
af9340807506c89063f7512bf128777cc071939e | TypeScript | steveukx/git-js | /simple-git/src/lib/responses/StatusSummary.ts | 2.671875 | 3 | import { StatusResult } from '../../../typings';
import { append, NULL } from '../utils';
import { FileStatusSummary } from './FileStatusSummary';
type StatusLineParser = (result: StatusResult, file: string) => void;
export class StatusSummary implements StatusResult {
public not_added = [];
public conflicted =... |
bec59e46490dae808a134f1acf09ebd214e6dcee | TypeScript | validitylabs/PubHub | /applications/ui/src/store/notification/notification.types.ts | 2.75 | 3 | export enum AuthActionTypes {
SET_NOTIFICATION = 'SET_NOTIFICATION',
REMOVE_NOTIFICATION = 'REMOVE_NOTIFICATION'
}
export enum NotificationType {
SUCCESS = 'SUCCESS',
INFO = 'INFO',
WARNING = 'WARNING',
ERROR = 'ERROR'
}
export interface INotification {
message: string;
type: Notificat... |
3f493f6fffdde34b5194748fa6c34f18c97ef927 | TypeScript | kos0ama/playwright | /index.ts | 2.765625 | 3 | import { chromium } from "playwright";
import { Parser } from "json2csv";
import * as fs from "fs";
const options = {
headless: false,
};
const BASE_URL =
"https://cloudapi.zendesk.com/hc/ja/categories/201092361";
const PER_PAGE = 10;
(async () => {
const stores = [];
const browser = await chromium.launch(o... |
48a104a07cc19edc79da457a87efa1d39397c90b | TypeScript | arkher/CadastroProdutos | /src/utils/filter-generator.ts | 3.125 | 3 | const operationMap = {
equals: ':',
different: '!:',
greaterThan: '>',
lowerThan: '<',
in: '::',
notIn: '!::',
contains: ':*',
startsWith: '>*',
endsWith: '*<',
};
export type Operation =
| 'equals'
| 'different'
| 'greaterThan'
| 'lowerThan'
| 'in'
| 'notIn'
| 'contains'
| 'startsWit... |
f797f9914d34ea5855d2d587e8bbd8117b7385e9 | TypeScript | albru/Vertical-bar-chart | /src/components/chart/utils/transformToStyles.ts | 2.625 | 3 | import { ChartData } from "../../../types";
import { ChartElementStyles } from "../types";
export const transformToStyles = (data: ChartData) =>
data.reduce<ChartElementStyles[]>((acc, { height, width, ...rest }) => {
const chartProps = {
height: height + "px",
width: width + "px",
...rest,
... |
3ca461413af19981281a2a819a95d2567ecc1326 | TypeScript | Josue-Lopez/DAV | /Frontend/FrontendApp/src/app/usuario.ts | 2.703125 | 3 | export class Usuario {
public codUsuario: number;
public username: string;
public codTipousuario: number;
public nombre: string;
public password:string;
public email: string;
public realm: string;
public emailVerified:boolean;
public tipoRol: string;
/**
*
*/
cons... |
222ee8767f8aafd20b16b2e64d0acce9cd9aa03d | TypeScript | khsr/angular-typescript | /src/app/shared/pipes/currency.pipe.ts | 2.65625 | 3 | import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'currencyPipe'
})
export class CurrencyPipe implements PipeTransform {
transform(value: any, args?: any): any {
if (value >= 1000000000) {
return (value / 1000000000).toFixed(1).replace(/\.0$/, '') + 'B';
}
if (value >= 1000000) ... |
a7260ff9889bf30cbcb8794950073182049b94ef | TypeScript | dacarley/aquarium | /src/lib/Dimmer.ts | 2.5625 | 3 | import moment from "moment";
import Config from "$lib/Config";
import * as Shutdown from "$lib/Shutdown";
import * as DimmerScheduler from "$lib/DimmerScheduler";
import * as PCA9685 from "$lib/PCA9685";
let lastUpdateTimestamp = moment("1975-11-23T00:00:00.000Z");
PCA9685.init(0x40, 1000);
export async function init... |
def3aca90c22ef76d764effb1952680ff0c9e316 | TypeScript | JulioCesar82/arquitetura-fullstack | /server/src/app/user.ts | 2.578125 | 3 | import {Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn} from 'typeorm';
import * as bcrypt from 'bcrypt';
@Entity('USERS')
export class User {
@PrimaryGeneratedColumn()
id: number;
@Column({
length: 50,
nullable: false
})
firstname: string;
@Column({
length: 50,
... |
ecf44d07afd935024098c3f89018c6340fbe4bfc | TypeScript | nekitus/artibox | /packages/slate-common/src/serializers/utils/getFirstAncestor.ts | 2.703125 | 3 | import { Element } from 'slate';
import { WithElementParent } from '../typings';
export function getFirstAncestor<E extends Element>(
element: Element & WithElementParent,
match: (element: Element & WithElementParent) => boolean
): (E & WithElementParent) | undefined {
const { parent } = element;
return (paren... |
9bc019113f1649ce295d1ea8229ef20623c7fe5b | TypeScript | locolucco209/MongoScraper | /python/anaconda/pkgs/bokeh-0.12.5-py27_1/lib/python2.7/site-packages/bokeh/server/static/js/tree_ts/models/transforms/jitter.ts | 2.5625 | 3 | var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
... |
dbe4838a6cd90e3cf70827637f28359e10231dc1 | TypeScript | tamasc/memory-game-sch | /src/app/app/game/game.component.ts | 2.609375 | 3 | import { Component, OnInit } from '@angular/core';
import { GameService } from '../services/game.service';
@Component({
selector: 'app-game',
templateUrl: './game.component.html',
styleUrls: ['./game.component.scss']
})
export class GameComponent implements OnInit {
private allCards = [
'angular', 'd3', 'jenki... |
0aec5ace0e7c47f5f8d1f6f956e0889f0f675ca5 | TypeScript | SatadruBhattacharjee/monorepo-fullstack-typescript-react-express-jest-cypress | /apps/backend/api/src/app/card/card.controller.ts | 2.734375 | 3 | import * as express from 'express';
import HttpException from '../exceptions/HttpException';
import Controller from '../interfaces/controller.interface';
import cardValidationMiddleware from '../middleware/cardValidation.middleware';
import { ICreditCard } from '@test-workspace/model';
class CardController implements ... |
606335139c26a96344c102513e80f8b131cfdd6a | TypeScript | ErickVAleman/reaper-graphql | /src/controllers/src/func_filter.ts | 3.734375 | 4 |
/**
*
* @param input String de entrada para el filtrado
* @param data Array de objetos
* @param nameIndex Indice de los objetos para realizar el filtrado
*/
export const FILTER_ARRAY_OBJECTS = async (input: string, data: object[], nameIndex: string) => {
return await data.filter((el: any) => el[`${name... |
03146210bdf39d3813e025963403f38fcfcbe3a6 | TypeScript | agroupp/numty_bak | /packages/core/src/operators/mathematical/miscellaneous/isNumber.ts | 3.390625 | 3 | /**
* Return `true` if input data is `number`
*
* @category Mathematical Miscellaneous
*
* @param value Input data
*/
export function isNumber(value: number): boolean {
return Number(value) === value;
}
|
23abcf7dd3700ad0a772f1b2c257bd0834d3c331 | TypeScript | iwe7/ims-chain | /packages/ims-close-port/lib/index.ts | 2.5625 | 3 | import child_process = require("child_process");
const { exec } = require("shelljs");
const timeout = 1000;
export function close(port: number) {
return new Promise(resolve => {
const child = child_process.spawn("lsof", ["-i", `:${port}`]);
child.stdout.on("data", rst => {
let data = rst.toString("utf8"... |
16d089d9b356dd60d0a77b1faf0342e4a80c96bd | TypeScript | 12138qzj/lesson | /es6/addts.ts | 2.96875 | 3 | function addts(num1 :number, num2:number):number{
return num1+num2;
}
console.log(addts(5,6)) |
241aef3f7675d08bb167c0e3408b9133e59a6d6c | TypeScript | BurakAytekin/RepoOfBinance | /Saatlik_MA_CiftHoplama-master/src/app/services/helper.service.ts | 2.828125 | 3 | import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class HelperService {
constructor() { }
sortByProperty = function (property) {
return function (x, y) {
return ((x[property] === y[property]) ? 0 : ((x[property] > y[property]) ? 1 : -1));
};
};
DateT... |
52a6d57460d737fde39248727b89b2a0e66a5393 | TypeScript | tonghoai/typescript-restful-starter | /src/sercurity/jwt.ts | 2.90625 | 3 | import * as jwt from "jsonwebtoken";
interface InterfaceJWTService {
decode(token: string): InterfaceJWTDataDecode;
encode(data: object): string;
}
interface InterfaceJWTDataDecode {
user_id: number;
}
class JWT implements InterfaceJWTService {
private _jwt: jwt;
constructor() {
this._j... |
ac4c4721dce62c10fe8e728eb7ee0b522487f5aa | TypeScript | quachtridat/fdu-campushub | /lib/announcements.ts | 2.53125 | 3 | import fs from 'fs'
import path from 'path'
import unified from 'unified'
import remarkParse from 'remark-parse'
import remarkRehype from 'remark-rehype'
import rehypeRaw from 'rehype-raw'
import rehypeStringify from 'rehype-stringify'
import rehypeSanitize from 'rehype-sanitize'
import toVfile from 'to-vfile'
import v... |
94f62475118b937fb4471dacc4604845d603a44c | TypeScript | wenye123/async-once | /test/test-index.ts | 2.875 | 3 | import AsyncOnce, { AsyncOnceError } from "../src/index";
import { assert } from "chai";
function sleep(ms: number) {
return new Promise(resolve => {
setTimeout(resolve, ms);
});
}
describe("AsyncOnce", function() {
it("获取数据", async function() {
const aonce = new AsyncOnce({ timeout: 1000 });
const ... |
99e1c346fd25605ee9cc2a18b0838a402ea1945a | TypeScript | OpenAPITools/openapi-generator | /samples/openapi3/client/petstore/typescript/builds/inversify/services/ObjectParamAPI.ts | 2.703125 | 3 | import type { HttpFile } from '../http/http';
import type { Configuration } from '../configuration'
import type * as req from "../types/ObjectParamAPI";
import type { ApiResponse } from '../models/ApiResponse';
import type { Category } from '../models/Category';
import type { Order } from '../models/Order';
import typ... |
d9a4a0a5d4ab0d47e989512b81a4747d3856ba6e | TypeScript | tcharlat/rest-api-test | /src/store/Stocks/reducer.ts | 2.90625 | 3 | import { Reducer } from "react";
import { StockState, StockActions } from "./typings";
export const defaultStocks: StockState = {
data: [],
fetchStatus: "INIT",
dataSource: "none"
};
export const stockReducer: Reducer<StockState, StockActions> = (
state = defaultStocks,
action
) => {
switch (action.type) ... |
af95ddcabb774087cf5b837256d99287d8f1deaf | TypeScript | crimx/ext-saladict | /src/components/dictionaries/ahdict/engine.ts | 2.671875 | 3 | import { fetchDirtyDOM } from '@/_helpers/fetch-dom'
import {
HTMLString,
getText,
getInnerHTML,
handleNoResult,
handleNetWorkError,
SearchFunction,
GetSrcPageFunction,
DictSearchResult
} from '../helpers'
export const getSrcPage: GetSrcPageFunction = text => {
return `https://ahdictionary.com/word/s... |
3f446dec2286d43562c14a0f7b04cc720675b9a2 | TypeScript | calebpitan/nextjs-ts-redux-template | /app/redux/cursor/types.ts | 2.765625 | 3 | import { Action } from 'redux'
export enum QueryCursorActionTypes {
INCRENENT_OFFSET_FACTOR = 'INCRENENT_OFFSET_FACTOR',
SET_LIMIT = 'SET_LIMIT',
}
export interface QueryCursorOffsetFactorAction extends Action<QueryCursorActionTypes> {
type: QueryCursorActionTypes.INCRENENT_OFFSET_FACTOR
}
export interface Que... |
45f49faca112fb52e47f488e5468da4490f91c12 | TypeScript | Jamyth/nest-api-generator | /src/util/createControllerMethod.ts | 2.8125 | 3 | import {Utility} from "../util";
import type {ControllerMethod, MethodParameter, RequestMethod, TransformDataType} from "../type";
import {ReflectUtil} from "../reflect";
export function createService(target: Object, methodName: string | symbol, path: string, requestMethod: RequestMethod) {
/**
* Get function... |
2c617e2e69b82785bb40dc953b801f2d85efd389 | TypeScript | snjanbu/TypeScript | /module.ts | 3.09375 | 3 | import {Vehicle} from './interface'
class Lorry implements Vehicle{
name:string;
constructor(name:string){
this.name=name;
}
drive(){
console.log('Driving Lorry');
}
}
var lorry=new Lorry('Benz');
lorry.drive(); |
9dd0532b9a12f3fa4a71d54fc5f3cc4d50d625a8 | TypeScript | three/nand-simulator | /devices/ParallelReader.ts | 2.9375 | 3 | import {Circuit} from "../Circuit.ts";
/**
* Read byte from device.inputNodes on positive clock edges when readyNode is high, and output to stdout
*/
export class ParallelReader {
circuit: Circuit;
inputNodes: number[];
readyNode: number;
value: Uint8Array;
ready: boolean;
clockNode: number;
... |
66abcef9d084b86994abe26c3222eedf0a17f399 | TypeScript | liujunnan0516/a-barrage | /src/commander/css-renderer/base-fixed.ts | 2.8125 | 3 | import BaseCssCommander from './base-css'
import { CommanderConfig, FixedBarrageObejct } from '../../types'
import Track from '../../track'
import { isEmptyArray } from '../../helper'
import { createBarrage, appendChild } from '../../helper/css'
export default abstract class BaseFixedCssCommander extends BaseCssComman... |
de69f700680ae11de782e656e9ab782ce5a08373 | TypeScript | Josephine19001/JustShop | /client/src/redux/reducers/cart.ts | 2.953125 | 3 | import {
CartState,
ProductActions,
ADD_PRODUCT,
INCREASE_QUANTITY,
DECREASE_QUANTITY,
EMPTY_CART,
REMOVE_PRODUCT,
ProductState,
} from "../../types";
const initialState: CartState = {
inCart: [],
};
export default function product(
state = initialState,
action: ProductActions
): CartState {
s... |
811d9892829a78669bf66c47509f4b24cd562bdb | TypeScript | tanay-pingalkar/replace.js | /tests/regex.test.ts | 2.921875 | 3 | import {
functionRegex,
keyWordRegex,
arrAndObjRegex,
} from "../src/utils/regex";
describe("gonna check if regex works fine", () => {
const str =
"<h1>{{ var }}</h1><h1>{{ (bool)=>bool? 'hello' : 'bye' }}</h1><h1>{{ arr[0] }}</h1>\n<h4>{{ obj.lol[0].lol }}</h4>";
it("should match functions", () => {
... |
e8562b11dbbcd62a7afdbd42067e955c122cdd24 | TypeScript | wanggao/away3d-core-ts | /src/away/events/EventDispatcher.ts | 3.203125 | 3 | ///<reference path="../_definitions.ts"/>
/**
* @module away.events
*/
module away.events
{
/**
* Base class for dispatching events
*
* @class away.events.EventDispatcher
*
*/
export class EventDispatcher
{
private listeners:Object[] = new Array<Object>();
private lFncLength:number;
/**
* Ad... |
d8b05fe578c2085cc6b0483db229258c82b588f0 | TypeScript | HHHHHHHHHHHHHHHHHHHHHCS/MyTinyModeTest01 | /Assets/MyFirstDemo/Scripts/LogPosition.ts | 2.578125 | 3 |
namespace game {
//普通的log
export class LogPosition extends ut.ComponentSystem {
static onlyOnce: boolean = false
OnUpdate(): void {
return;
if (LogPosition.onlyOnce) {
return
}
LogPosition.onlyOnce = true
this.world.forEach([ut.Entity, ut.Core2D.TransformNode], (entity, transformNode) => ... |
8f483552d66741404bfac5a98b3115d0b837ba14 | TypeScript | MikeNats/card-manager | /src/domain/card/cardService.ts | 2.96875 | 3 | import { CardModel } from './entity'
import { v4 as uuidv4 } from 'uuid';
import valid from 'card-validator';
import creditCardType from "credit-card-type";
import { ReactText } from 'react'
export const createCard = (card: CardModel): CardModel => Object.freeze({
id: card && card.id ? card.id : uuidv4(),
typ... |
3676e2bc9f920a90480dd7df2e6d951e1ec935bc | TypeScript | jack0612/tutorial | /src/app/custom-control/text-input/text-input.component.ts | 2.59375 | 3 | import { Component, forwardRef, Input, Self, OnInit } from '@angular/core';
import { NG_VALUE_ACCESSOR, ControlValueAccessor, NgControl, FormControl } from '@angular/forms';
//https://github.com/profanis/angular-custom-form-elements/blob/custom-form-with-validation/src/app/app.component.ts
@Component({
selector: 'tex... |
a9fd39906d85e24b702723205df363769f73313e | TypeScript | OfirTheOne/mongo-ts | /lib/core/meta/function/static.ts | 2.765625 | 3 | import { MetadataAgent } from '../../../helpers'
/**
* @description
* class method, decorated with '@Static', will be handled as a static model method,
* 'this' key word will refer to the Model itself, not a specific document.
* @warn
* using 'this' at compilation time is not reflect the context ... |
e4e073621d14a85d2611778959930f9a2552f24f | TypeScript | robertohonda/typescript-express-mongo-boilerplate | /src/responses/APIResponse/APIResponse.ts | 2.6875 | 3 | import { OK } from "http-status";
import {OK as OK_MESSAGE} from "../../messages/standard";
import { SUCCESS } from "../../messages/types/standard";
import IAPIResponse from "./IAPIResponse";
class APIResponse implements IAPIResponse {
public status: number;
public message?: string;
public type: string;
public... |
031d4209511286001557c27929b04fb8536ed287 | TypeScript | alejandromz96/angular-testing.github.io | /ionic-unit-testing-example/src/pages/page-testing/components/warrior-component/warrior-component.ts | 2.59375 | 3 | import { Component } from '@angular/core';
import { WarriorInterface } from '../../interfaces/warrior.interface';
@Component({
selector: 'warrior-component',
templateUrl: 'warrior-component.html'
})
export class WarriorComponent {
private warriorClasses: string[] = ["Luchador", "Mago", "Paladin", "Sacerdote", "... |
d7f5990b1cb4a2093d6e0db8bd632b4fd6efd451 | TypeScript | strong-roots-capital/fp-ts-react-stable-hooks | /test/callback.test.ts | 3.03125 | 3 | import * as Eq from 'fp-ts/Eq';
import * as O from 'fp-ts/Option';
import { renderHook } from '@testing-library/react-hooks';
import { useStableCallback } from '../src/index';
const o1a = O.some(1);
const o1b = O.some(1);
const o2 = O.some(2);
const nEq = Eq.getTupleEq(O.getEq(Eq.eqNumber));
describe('useStableCallba... |
85a0d83af5b5a2db45048c91bd764ea90af0cf43 | TypeScript | ETM44/TPMessagerie | /src/app/modeles/messagesAdaptateur.ts | 2.578125 | 3 | import {Message} from "./Message";
import {Personne} from "./Personne";
export class messagesAdaptateur {
static _idMessage: number = 1;
static _idPersonne: number = 1;
constructor() {
}
static messageAPI(listMessage: Array<any>): Array<Message> {
let newListMessage: Array<Message> = new Array<Messag... |
0e3db5b4d5f45f1b09083a196d24d7c8090b95a7 | TypeScript | tobslob/pdfmills | /src/drawables/block.ts | 3.15625 | 3 | import { BoundingBox, Context, Element, Layout } from '../base';
import sumBy = require('lodash/sumBy');
/**
* This arranges all it's element on a vertical line using the width
* of its bounding box.
*/
export class Block implements Layout {
constructor(private elements: Element[]) {
if (elements.length < 2) ... |
ce2887b20572dd791c8f998eec0ee1f01eec3a86 | TypeScript | snelsi/canvas-hexagons | /src/scripts/random-helpers.ts | 3.25 | 3 | export const random = (a = 1, b = 0) => {
const lower = Math.min(a, b);
const upper = Math.max(a, b);
return lower + Math.random() * (upper - lower);
};
export const randomInt = (a = 1, b = 0) => {
const lower = Math.ceil(Math.min(a, b));
const upper = Math.floor(Math.max(a, b));
return Math.floor(lower + ... |
e8c85edd04aa6b969175f4c70ec8add63f61d1e0 | TypeScript | TW2002/twxp | /Source/Installer/TWXS27/Public/end_bd.ts | 2.71875 | 3 | #Ender's Quick Backdoor finder v1.0
#Will quickly find the back door of Terra or StarDock
clientMessage "You can find back door to terra anywhere, but for the Star dock, you must be there."
Send "'Ender's Quick Backdoor finder v1.0 loaded! *"
clientMessage "Either scroll back up to see back door, or use the $ D - <sec... |
42d0ab6895931f1bac6d9bb3e46d3a0b6ed6a2bf | TypeScript | rofl4lol/rofl4lol.github.io | /Request.ts | 2.625 | 3 | import Summoner = require("Summoner");
module Request {
export class Info {
Path: string;
OnSuccess: (string) => void;
OnError: (number) => void;
constructor(path: string, onSuccess: (string) => void, onError: (number) => void) {
this.Path = path;
this.OnS... |
338a02c67755acc6f152ad9a5bc72e8c663f932d | TypeScript | williamhammond/vscode-scar | /src/diagnostic/luaParserDiagnostic.ts | 2.734375 | 3 | 'use strict';
import {Diagnostic, Range, Position, DiagnosticSeverity} from 'vscode';
import {ILuaParseError} from 'luaparse';
/**
* Represents a Diagnostic for LuaParser errors.
*/
export default class LuaParserDiagnostic extends Diagnostic
{
/**
* Creates a new instance of LuaParserDiagnostic.
* @pa... |
ce9b85295e42238cd8351b7ffcfd8fbfaa1a9970 | TypeScript | hanbingleixue/TypeScript | /2-Functions/Function.ts | 4.40625 | 4 | /**
* Function
* 函数
*/
/**
* 给函数指定返回值的几种方式
*
* function fnName(arg:string[指定传入string类型的数据],arg2:number[指定传入number类型的数据]):number[指定函数的返回值为number类型]{
* 函数体...
* }
*
* var fnName = function(arg:string[指定传入string类型的数据],arg2:number[指定传入number类型的数据]):string[指定函数的返回值为string类型]{}
*
*/
function add(x: string, ... |
4d670f3f29574185de7c6c42dc57287fc7be706d | TypeScript | delesseps/newdash | /test/max.test.ts | 3.234375 | 3 | // @ts-nocheck
import * as assert from 'assert';
import map from '../src/map';
import max from '../src/max';
import maxBy from '../src/maxBy';
import { falsey, noop } from './utils';
describe('max', () => {
it('should return the largest value from a collection', () => {
assert.strictEqual(max([1, 2, 3]), 3);
... |
776891d30eeccec3a70d38ff95f9ecc270ea9ba1 | TypeScript | liyuanyuan125/mobile-front-web | /src/components/cakeChart/types.ts | 2.84375 | 3 | /**
* sexItem 数据项 男女比例
*/
export interface ObjData {
/** 名称 */
name: string
/** 数值 */
value: number
}
/**
* AnnularItem 数据项
*/
export interface DataItem {
/** 名称 */
data: ObjData[]
/** 数值 */
color?: any[],
/** 左上角标题 */
title: string,
/** 是否显示中间的文本 */
emphasisShow: boolean,
/** 敏感度 */
se... |
a507b44bdf171f2af5aa1529f9a8ddbd4ecf6258 | TypeScript | BataLaSalade/site-avis-resto | /src/app/model/Resto.ts | 2.515625 | 3 | import { Rate } from "../model/Rate";
import { Geometry } from "../model/Geometry"
import { Photo } from "../model/Photo"
export class Resto {
name?: string
place_id?: string
vicinity?: string
geometry?: Geometry
rating?: number
user_ratings_total?: number
ratings?: Rate[]
photos?: Photo... |
07f5fad2c15f1eb585044d423afc8a7e9da0fcfb | TypeScript | serverwizard/express-with-typescript-study | /src/controller/UserController.ts | 2.78125 | 3 | import {User} from "../entity/User";
import {DELETE, GET, Path, PathParam, POST} from "typescript-rest";
import {UserService} from "../service/UserService";
import {UserDto} from "../dto/UserDto";
import {Inject} from 'typescript-ioc';
// const validator = require('../validator/RequestValidator');
/**
* TODO
* 1. 스... |
56a66def6713b038c660c6b63fa8f26507fec79f | TypeScript | akulyk/ts29022020 | /old/ajax.ts | 2.546875 | 3 | import { ajax, AjaxResponse } from "rxjs/ajax";
import { debounceTime, map } from "rxjs/operators";
import { forkJoin, fromEvent, Observable } from "rxjs";
const request$ = ajax('http://learn.javascript.ru/courses/groups/api/participants?key=1i7qske')
.pipe(
map((res: AjaxResponse) => res.response),
)... |
437ae2e7b97597ce9fc24279555b1c82c9396cc6 | TypeScript | ArifZx/ant-serv | /index.ts | 2.78125 | 3 | import Axios, { AxiosPromise, AxiosInstance } from 'axios'
export interface AntarestResult<T> {
status: number,
message: string,
payload?: T
}
export interface Comparator {
[field: string]: {
$eq?: string | number | boolean,
$gt?: number,
$gte?: number,
$in?: string[] | number[],
$lt?: num... |
8bdbb1e41ed08a3af8afa8bcc05b20120e57610e | TypeScript | kitwestneat/ati-fp-ts | /src/components/admin/module-list-utils.ts | 2.640625 | 3 | import { SECTION_TYPES } from '@/constants';
import { isDevEnv } from '@/utils';
import { ModuleSpec } from '../../types';
export interface KeyedModuleSpec extends Partial<ModuleSpec> {
key: number;
isNew?: boolean;
}
let nextKey = 0;
function getModuleKey() {
return nextKey++;
}
export function getListW... |
833dd05e9107405a56483eb5fd1646bfe7bf29a7 | TypeScript | pablohs1986/dam_pmdm | /TypeScript/Ejercicios1_soluciones/Ejercicio4_filter_con_params.ts | 3.203125 | 3 | let animales: any = [
{
nombre: "Poppy",
especie: "Burro",
hobbies: ["Comer", "Rascarse", "Galopar"],
propietario: {
nombre: "Adrián",
ciudad: "Avilés",
tfno: "601112235"
},
añoNacimiento: 2000
},
{
nombre: "Pepa Pi... |
74041c329404fb9c548bc5808e0eb6584dd5c6cf | TypeScript | xiaomingplus/type-music | /src/player.ts | 2.515625 | 3 | let findExec = require('find-exec'),
cp = require('child_process'),
players = ['mplayer', 'afplay', 'mpg123', 'mpg321', 'play', 'omxplayer', 'aplay', 'cmdmp3'];
let spawn = cp.spawn;
let globalEventId = 1; //默认为1
interface Event {
id: number;
exec: (data?: any) => void;
}
interface EventMap {
[key: string]: Event[... |
cb90a471cb2ed319db960e01db469ab4718d6f18 | TypeScript | pranjal930/RapidKen | /src/app/employee.service.ts | 2.546875 | 3 | import { Injectable } from '@angular/core';
import { Subject } from 'rxjs';
import {Employee } from "./employee.model";
@Injectable({
providedIn: 'root',
})
export class EmployeeService{
employeesChanged = new Subject<Employee[]>();
isFirst=true;
employees:Employee[]=[
/*{
'name'... |
3ebaa9988c35db709a4a24556481cd0ecef173b3 | TypeScript | eyalmendel/logga-ts | /src/formats/StringFormatter.ts | 2.53125 | 3 | import { StringFormattedEntry } from './../entry/StringFormattedEntry';
'use strict'
import { Formatter } from './Formatter';
import { Entry } from '../entry/Entry';
export class StringFormatter implements Formatter {
format(entry: Entry): string {
return new StringFormattedEntry(entry).getFormattedData(... |
cab3b9ea9ff30e5f1118e254a48570e5586b2161 | TypeScript | emmanuelnk/redis-time-series | /src/__tests__/unit/entity/timestampRange.test.ts | 3.125 | 3 | import { CommandKeyword } from "../../../enum/commandKeyword";
import { TimestampRange } from "../../../entity/timestampRange";
test("timestamp range creation with default values", () => {
const tsRange = new TimestampRange();
expect(tsRange.getFrom()).toEqual(CommandKeyword.MIN_TIMESTAMP);
expect(tsRange.... |
18363ae9b0c455180d844e0978823fa1cc668932 | TypeScript | uhyo/blue-eyes | /src/logic/body.ts | 2.84375 | 3 | import { Monster } from "../data/Monster";
import { RandFunction } from "./RandFunction";
import { ovalEdge } from "./baseEdge";
import { range } from "../util/range";
import { distance } from "./math/distance";
import { boxMuller } from "./math/boxMuller";
import { addPosition } from "./math/addPosition";
import { Pos... |
d54c1282585e54dfbd78af8c787646e1f3d087e5 | TypeScript | maksym-plotnikov/ably-nest | /src/test/test.controller.ts | 2.546875 | 3 | import {
Body,
Controller,
Get,
Param,
Post,
UseGuards,
UseInterceptors,
UsePipes,
} from '@nestjs/common';
import { TestService } from './test.service';
import { CreateDto } from '../dto/create.dto';
// Pipes
import { ValidationPipe } from '../pipes/validation.pipe';
import { ParseIntPipe } from '../pi... |
b6f570889ba86e464e7163eb5b0c2dd079e98ba7 | TypeScript | amyhung/idlejs | /src/idle.spec.ts | 2.765625 | 3 | import { Idle } from './idle';
const testFactor = 1000;
describe('Idle', () => {
let idle: Idle;
afterEach(() => {
idle.stop();
});
it('should call do method when not interactive', done => {
let called = false;
idle = new Idle()
.whenNotInteractive()
.within(1, testFactor)
.do... |
cefcc1c8213e0e859514636b31ea461ff5027954 | TypeScript | theednaffattack/create-project | /src/templates/project-templates/backend/src/entity/Image.ts | 2.59375 | 3 | import {
BaseEntity,
Entity,
PrimaryGeneratedColumn,
Column,
ManyToOne
} from "typeorm";
import { Field, ID, ObjectType } from "type-graphql";
import { User } from "./User";
import { Message } from "./Message";
@ObjectType()
@Entity()
export class Image extends BaseEntity {
@Field(() => ID)
@PrimaryGene... |
cfc4c7622be536408bc7f86818ed5ca0a22f6d1b | TypeScript | darwin1224/nest_test | /src/article/article.controller.ts | 2.734375 | 3 | import {
Controller,
Get,
NotFoundException,
Param,
Body,
BadRequestException,
Post,
Delete,
Put,
} from '@nestjs/common';
import { ArticleService } from './article.service';
import { Article } from './article.entity';
import { UpdateResult, DeleteResult } from 'typeorm';
import { ArticleDto } from '.... |
36a5adf4cc49374c895d646b901684762fedfb8f | TypeScript | ezavile/postcss-typescript-css | /src/buildFile.ts | 2.5625 | 3 | const camelCase = require('camelcase');
const path = require('path');
import { PostcssTypescriptCss } from './namespace/PostcssTypescriptCss';
const build = (file: PostcssTypescriptCss.Options) => {
const extension = path.extname(file.cssFileName);
const filename = path.basename(file.cssFileName, extension);
return (... |
4c6424fc56939504ddee127c5a4df8b50eca13e7 | TypeScript | csstools/postcss-plugins | /plugins/postcss-image-set-function/src/index.ts | 2.75 | 3 | import valueParser from 'postcss-value-parser';
import { processImageSet } from './lib/process-image-set';
import type { PluginCreator } from 'postcss';
import { handleInvalidation } from './lib/handle-invalidation';
import { hasFallback } from './has-fallback-decl';
const imageSetValueMatchRegExp = /(^|[^\w-])(-webki... |
806a981922eb322818e56845a39269cf263b3dc8 | TypeScript | rudy3091/cau-rainbowsystem-data | /test/excur.test.ts | 2.671875 | 3 | import request from "supertest";
import app from "../src";
describe("GET /api/rainbow/excur", () => {
test("should return every data by default rows and page number", (done) => {
request(app)
.get("/api/rainbow/excur")
.then((res) => {
const data = res.text;
const defaultRows = 20;
expect(JSON.pa... |
5b3d214ed5d63ac5e79e6c194ce527214b205618 | TypeScript | tianlugang/poorest | /packages/bom/src/contains.ts | 2.65625 | 3 | export function contains(root: HTMLElement, el: HTMLElement) {
var node: HTMLElement | null = el;
while (node) {
if (node === root) {
return true;
}
node = node.parentElement;
}
return false;
}
|
40c24b435c3e7e3156010d1cd0b5eb112bf77809 | TypeScript | harshit-budhraja/react-admin | /packages/ra-core/src/form/useInitializeFormWithRecord.ts | 2.625 | 3 | import { useEffect } from 'react';
import { useForm } from 'react-final-form';
import merge from 'lodash/merge';
/**
* Restore the record values which should override any default values specified on the form.
*/
const useInitializeFormWithRecord = record => {
const form = useForm();
useEffect(() => {
... |
94b9a4991fd67b0b46c9c98cfae4e864014d881a | TypeScript | arfedulov/typeorm-jsonapi-serializer | /src/Serializer/__tests__/Serializer.test.ts | 2.765625 | 3 | import { Entity, PrimaryGeneratedColumn, ManyToOne, OneToMany, Column } from 'typeorm';
import assert from 'assert';
const serializeEntityMock = jest.fn(
(resourceType: string, entity: any, options: any) => {}
);
jest.setMock('../serializeEntity', {
serializeEntity: serializeEntityMock,
});
import { Serializer }... |
2d70b96b7451368c9ccedea3c4d84d4fa5bc51c2 | TypeScript | Henrixounez/ScanEat-Backend | /src/routes/Category/controller.ts | 2.6875 | 3 | import { Request, Response } from "express";
import { getRepository } from "typeorm";
import { StatusCodes } from 'http-status-codes';
import { Restaurant } from "../../entities/Restaurant";
import { Category } from "../../entities/Category";
import { DishReturn, formatDishReturn } from "../Dish/controller";
import { U... |
888918f457a9427b3dbcf13c12590f9632289124 | TypeScript | iceyang/data_structure_and_algorithm_code | /ts/src/stack_by_queue/stack_by_queue.ts | 3.59375 | 4 | /**
* 由队列实现的栈
*/
import Queue from '../lib/queue';
export default class StackByQueue<T> {
private queue: Queue<T> = new Queue<T>();
length(): number { return this.queue.length(); }
push(t: T) {
this.queue.push(t);
}
pop(): T | undefined {
const length = this.length();
if (length > 1) {
... |
dd7fe27834b9c8b416012343aa0ce7481f69d0dc | TypeScript | sundarcodes/Angular-bootcamp-21-Aug | /Day-2/EmpSalary/Employee.ts | 3.125 | 3 | export class Employee {
id: number;
name: string;
salary: number;
designation: string;
rating: number;
constructor(id: number,
name: string, currentSalary: number,
desig: string, rating: number) {
this.id = id;
this.salary = currentSalary;
this.designation = de... |
2b27c24bb15e4d5bc14d0375a05b7456c3e7464b | TypeScript | MOTORIST/shri-2020-task-2 | /tests/warning.invalid_button_position.test.ts | 2.59375 | 3 | import linter from '../src/index';
import {
ERROR_CODE,
ERROR_TEXT,
} from '../src/rules/warning.invalid_button_position.rule';
import { LinterError } from '../src/types/LinterError';
describe(ERROR_CODE, () => {
describe('same level', () => {
const rightJson = `
{
"block": "warning",
"conten... |
f92d2168471b91369add69f85ce89a9d4088fec0 | TypeScript | UDcebower/educational-game-project-team-9-kalloyan-s-adam-j | /src/scripts/objects/interactiveDialogBox.ts | 2.953125 | 3 | export default class InteractiveDialogBox extends Phaser.GameObjects.Container {
private background: Phaser.GameObjects.Rectangle;
private interactableText: Phaser.GameObjects.Text;
private bgStartingX: number;
private bgStartingY: number;
private displayedText: Phaser.GameObjects.Text;
private ... |
5ab04177d7e15c4d29f5ab5291f74922321eaefc | TypeScript | NourDT/patreon-scraper | /types/request.ts | 2.515625 | 3 | // tslint:disable-next-line: no-empty-interface
interface ICommonRequestOptions { }
// tslint:disable-next-line: no-empty-interface
export interface ICurrentUserRequestOptions extends ICommonRequestOptions { }
export interface IStreamRequestOptions extends ICommonRequestOptions {
fields?: IFieldOptions;
filter?: ... |
d44b7031cf8077dc0818c292e214f0410e2d4029 | TypeScript | chwasiq0569/nextJS | /pages/api/login.ts | 2.53125 | 3 | import {NextApiRequest, NextApiResponse} from 'next';
import jwt from "jsonwebtoken";
const KEY = 'sajidiowuqioeklasdjasdkl';
export default (req: NextApiRequest, res: NextApiResponse) => {
// console.log('REQ.BODY: ',req.body);
// console.log('REQ.query: ',req.query);
// res.statusCode = 200;
console... |
2f351f7031c79469a33a94692b3bc3d449199512 | TypeScript | Coffeekraken/coffeekraken | /packages/tools/s-specs/src/node/SSpecs.ts | 2.828125 | 3 | import { __readJsonSync } from '@coffeekraken/sugar/fs';
import { __deepMap, __deepMerge, __get } from '@coffeekraken/sugar/object';
import type { ISSpecsSettings } from '../shared/SSpecs.js';
import __SSpecs from '../shared/SSpecs.js';
import __SSugarConfig from '@coffeekraken/s-sugar-config';
import { __isPlainObje... |
2aae637ba1365ecb9fab5b0d6bb54ef5a1552c91 | TypeScript | ezrafukss/money-ts | /src/NonZeroRational.ts | 3 | 3 | import { NonZeroInteger } from './NonZeroInteger'
import { Natural } from './Natural'
import { Option } from 'fp-ts/lib/Option'
import { Setoid } from 'fp-ts/lib/Setoid'
import { Ord } from 'fp-ts/lib/Ord'
import { Rational } from './Rational'
import * as natural from './Natural'
import * as rational from './Rational'
... |
e77529bcb36b4bc0296f489a2a9ef6a50b85ae3d | TypeScript | yurkagon/self-education | /fundamental/design_patterns/Structural/Facade/typescript.ts | 3.578125 | 4 | class Part1 {
public method1(): void {
console.log("method1");
}
}
class Part2 {
public method2(): void {
console.log("method2");
}
}
class Part3 {
public method3(): void {
console.log("method3");
}
}
class Facade {
private readonly part1: Part1;
private readonly part2: Part2;
private r... |
f3ee64d9b0688a06e0b5676623fbedb7f48e0eb7 | TypeScript | DGeisz/orchidv4-client | /src/routes/page/page_types/reduced_form/reduced_form.ts | 2.546875 | 3 | import { palette } from "../../../../global_styles/palette";
import { add_latex_color, create_tex_text } from "../../utils/latex_utils";
import { TexWidgetProperties } from "../../building_blocks/tex_element/building_blocks/tex_widget/tex_widget_types/tex_widget_types";
export enum ReducedFormTag {
TexLine,
Gl... |
5d6fc1c9bb7a8fd7f7c4afb17f4addf7dadc4cc9 | TypeScript | tdurtschi/bug | /src/core/entity-manager.ts | 3.046875 | 3 | import Entity from "./entities/entity";
import Bug from "./entities/bug/bug";
import Plant from "./entities/plant/plant";
export interface IEntityManager {
getEntities: () => Entity[]
addEntity: (entity: Entity) => void
}
export default class EntityManager implements IEntityManager {
private entities: Entity[] = [... |
cf620685a003973f2ea70820541398d0cfb8f8c7 | TypeScript | Joe123123/yumeek | /client/src/components/interfaces/Recipe.interface.ts | 2.53125 | 3 | export interface Recipes {
id: number | undefined;
carbs: number;
energies: number;
fat: number;
fiber: number;
health_labels: string[];
img_url: string;
ingredients: string[];
label: string;
protein: number;
src_url: string;
steps: string | null;
weekday: string | null;
}
export interface Fo... |
818d308204837f770bae50ff10ea84133fd9f363 | TypeScript | fefo-app/toggl-dashboard | /src/app/views/helpers/DateCalculator/DateCalculator.ts | 3.609375 | 4 | export enum Days {
Sunday,
Monday,
Tuesday,
Wednesday,
Thursday,
Friday,
Saturday
}
enum Months {
January,
February,
March,
April,
May,
June,
July,
August,
September,
October,
November,
December
}
export class DateCalculator {
static longestMonths = [
Months.January,
Mon... |
f75caf951f4a6165e873be62424e107f58a2a266 | TypeScript | hopetonpalmer/hp_components | /projects/hp-components/src/lib/scripts/strings.ts | 3.28125 | 3 | export function splitCamelCase(value: string): string {
return value.replace(/([a-z])([A-Z])/g, '$1 $2').toLowerCase();
}
export function splitCamelCaseProper(value: string): string {
const result = value.replace(/([a-z])([A-Z])/g, '$1 $2').toLowerCase();
return properCase(result);
}
export function properCase(... |
3a03a103a0ee6472ab0cf83eb56ce9879a72f998 | TypeScript | adibahasan11/Design-Patterns | /Observer-Pattern/Task -1/180042111.ts | 3.53125 | 4 | interface Subject{
notifyObserver(): void;
addObserver(display: Display): void;
removeObserver(display: Display): void;
}
interface Display{
update(CourseNo : string, TopicName: string, TeacherName: string, date: Date): void;
display(): void;
}
class ClassTimeData implements Subject{
private C... |