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 |
|---|---|---|---|---|---|---|
ce4717f101b0617acc156ad2514743ea83964842 | TypeScript | HappyJayXin/linkedin-clone-yt | /src/pages/api/snapshot.ts | 2.515625 | 3 | import type { NextApiRequest, NextApiResponse } from 'next'
const data = [
{
id: 1,
data: {
name: 'Jay',
description: 'Description',
message: 'Message',
photoUrl: 'photoUrl'
}
}
]
export type Data = typeof data
export default (req: NextApiRequest, res: NextApiResponse<Data>) =... |
cb90c17ba370ce91b18d4bbfb2fd46db6ed8a662 | TypeScript | akropolisio/credit-pool-frontend | /src/services/i18n/types.ts | 2.671875 | 3 | import { tKeys } from './constants';
interface CustomTranslateFunction {
(phrase: ITranslateKey): string;
(phrase: string, options?: number | InterpolationOptions): string;
}
interface InterpolationOptions {
smart_count?: number | { length: number };
_?: string;
[interpolationKey: string]: undefined | stri... |
9188cadaf255ceb1cdf4ee76933ea9ab29a699f9 | TypeScript | yszk0123/dotfiles | /deno/api/APIUtils.ts | 2.796875 | 3 | import { fromUint8Array } from 'https://denopkg.com/chiefbiiko/base64/mod.ts';
export type APIConfig = {
endpoint: string;
apiKey: string;
};
export async function fetchJSON<T>(
path: string,
query: { [key: string]: string },
config: APIConfig
): Promise<T> {
const encodedQuery = encodeQuery(query);
con... |
ba6dad3d86dbf10b107aacddcde55c87c9a90147 | TypeScript | HanadyMurshed/Book | /chapter 29/code/29.2.ts | 3.265625 | 3 | /**
* this is async gunctions call it is far from
* threading but since threading is not allawed
* in js I took this approuch eventhough I'm not
* Sgit staisfied with the code t all
*/
class FakeThread {
tag: number;
freq_space;
data_space;
word_count_space: {} = {};
freq = [];
co... |
df25de2426318796c6801ff2e2862b23f0f0fea8 | TypeScript | Mahmuod14M/Hyper-Techno | /src/app/see-more.pipe.ts | 2.515625 | 3 | import {Pipe, PipeTransform} from '@angular/core';
@Pipe({
name: 'seeMore'
})
export class SeemorePipe implements PipeTransform {
transform(txt: string, lngth: number): string {
const x = txt.slice(0, lngth);
let final = '';
for (let i = 0; i < 5; i++) {
final += x[i] + ' ';
}
return x +... |
7e52ec525406453ef009e4cde2776795301aff73 | TypeScript | favedit/MoCloud3d | /TypeScript/source/common/math/SVector4.ts | 2.8125 | 3 | module sk.common.math {
//==========================================================
// <T>四维向量。</T>
//
// @struct
// @author maocy
// @version 150119
//==========================================================
export class SVector4 extends SValue4 {
//===================================... |
4af7c326dfb4e4da6418f2b9545105753300375c | TypeScript | anupsaw/file-server | /src/controllers/util.ts | 2.71875 | 3 |
import * as path from 'path';
import * as fs from 'fs';
import { config } from '../settings/index';
export class Util {
public static create(): Util {
return new Util();
}
/** Create directory */
public mkdir(dir: string): string {
const findAndCreate = (rootPath: string, folder: str... |
40caf63b9f811107383fccbcf6ed8fc09d5210bc | TypeScript | Azure/azure-iot-library | /configuration/src/envConfiguration.spec.ts | 3.140625 | 3 | /* Copyright (c) Microsoft Corporation. All Rights Reserved. */
import {EnvConfiguration} from './envConfiguration';
/**
* Test EnvConfiguration's getString and get<T> methods.
*
* Before each spec set the environment variables appropriately.
* Specs test:
* - returned value is correct value and type
* ... |
464c6a547ff62abebba8833a67b7d25c09826304 | TypeScript | tcarrio/polyglot-snapshot-ts | /src/snapshot/validator.ts | 3.03125 | 3 | import { ValidationError } from "../errors";
import { isPromise } from "../util/is-promise";
export class SnapshotValidator {
public static validate(snapshot: unknown): void {
switch (typeof snapshot) {
case "function":
throw new ValidationError("Function not serialized");
case "bigint":
... |
f0d71bf9daa008a5e8367edea9fbb40cc696da73 | TypeScript | brandon-pereira/betterdo-api | /src/controllers/lists.ts | 2.515625 | 3 | import { throwError } from '../helpers/errorHandler';
import { ObjectId } from 'mongodb';
import { RouterOptions } from '../helpers/routeHandler';
import { List, ListDocument } from '../schemas/lists';
import { isCustomList, getCustomListById, getAccountsCustomLists } from '../helpers/customLists';
import { parseObject... |
e1f603be7cab51d972adcf7ca60a850af1e23191 | TypeScript | microsoft/ts-parsec | /packages/tspc-test/src/TestParser.ts | 2.765625 | 3 | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// tslint:disable:no-duplicate-imports
// tslint:disable:trailing-comma
import * as assert from 'assert';
import * as parsec from 'typescript-parsec';
import { buildLexer, Token } from 'typescript-parsec';
import { alt, alt_sc, apply, errd, kl... |
749d2f1c34d4cc3e05e8e975ed3d3d85536e0dc1 | TypeScript | graphprotocol/dharma-subgraph | /types/schema.ts | 2.640625 | 3 | import {
TypedMap,
Entity,
Value,
ValueKind,
store,
Address,
Bytes,
BigInt
} from "@graphprotocol/graph-ts";
export class DebtOrder extends Entity {
constructor(id: string) {
this.set("id", Value.fromString(id));
return this;
}
save(): void {
let id = this.get("id");
assert(id !=... |
213cea839ad30163adf12a38a5dda1149687a4d7 | TypeScript | JonStargaryen/ts-stream | /src/map.ts | 3.234375 | 3 | import {createStream, Stream} from "./stream";
class MapIterator<S, T> implements Iterator<T> {
constructor(private readonly map: (item: S) => T,
private readonly iterator: Iterator<S>) {
}
next(value?: any): IteratorResult<T> {
const item = this.iterator.next();
return it... |
518d1df48cad8df07325af02a9d69da31ab75108 | TypeScript | Raindrips/cocos_creator_example | /happybird/assets/script/model/EffectInfo.ts | 2.546875 | 3 | import {ANITIME } from './typeModel'
/**
*
* @param {开始播放的时间} playTime
* @param {*cell位置} pos
* @param {*第几次消除,用于播放音效} step
* @param {*消除次数}step?
*/
export default interface EffectInfo{
playTime:ANITIME,
pos:cc.Vec2,
action: string
step?:number
}
|
eeed8ec0616fe50693fe03ad557c1baefb0da4a4 | TypeScript | BlueGhostAlt/Codify | /src/modules/commands/admin/setpinchannel.ts | 2.796875 | 3 | import { Command } from "@enitoni/gears-discordjs";
import { ParseArgumentsState } from "../../../common/parsing/middleware/parseArguments";
import { matchPrefixesStrict } from "../../../common/matching/matchPrefixesStrict";
import { createMetadata } from "../help/createMetadata";
import knex from "../../../../db/kne... |
51b2198dea0c01af80826b5993a82b8e125fdb2f | TypeScript | zuned/Typescript | /CustomerV3.ts | 3.5625 | 4 | class Customer {
//private _fName :string;
//private _lName :string;
private x :string;private y :string;
constructor(fName :string , lName :string )
{
// this._fName = fName;this._lName = lName;
this.x = fName;this.y = lName;
}
get fName() :string {
return this.x;//this._fName;
}
se... |
053023fc1f52231cfc49b7c4de9cf5780da809e9 | TypeScript | Netchive-old/Netchive | /src/common/plugins/data.ts | 2.59375 | 3 | import PluginPrototype from "../plugins/interface";
import { StreamSessionInterface } from "../record/streamSession/interface";
import { findPluginById } from ".";
/**
* 플러그인의 세션 정보를 가져옵니다.
* @param plugin 플러그인 오브젝트
* @param streamSession 스트림 세션
*/
export function getPluginSessionData(plugin: PluginPrototype, stre... |
993fe5411fd3b85d19557db311d8d0a2e66f4f36 | TypeScript | arturcarvalho/chatter | /chatter-fe/src/utils/applyTheme.ts | 3.3125 | 3 | type themeT = "light" | "dark";
/**
* Sets attribute data-theme with theme
* to ensure the css variables are applied.
* @param {string} theme - The theme name ("light" | "dark")
*/
const applyTheme = (theme: themeT) => {
// Going directly to the DOM.
document.documentElement.setAttribute("data-theme", theme);
... |
c178085908de0dbfbb7d85c733929fb369a8505b | TypeScript | taylorpreston/re-reselect | /typescript_test/cache.ts | 3.109375 | 3 | import createCachedSelector,{
FlatCacheObject,
FifoCacheObject,
LruCacheObject
} from '../src/index';
type State = {foo: string};
const fooSelector = (state: State) => state.foo;
const combinerSelector = (foo: string) => foo;
function testFlatCacheObject () {
// Accepts this cache object as an option
create... |
78039c86b653362876d1c26cf385a1e70a94b421 | TypeScript | devkeyboard/devkeyboard.github.io | /src/state/text-to-type-language.enum.ts | 2.796875 | 3 | import { SelectOption } from '../components/_core/select/select.component';
import { TextToTypeCategory } from './text-to-type-category.enum';
export enum TextToTypeLanguage {
ENGLISH = 'english',
FRENCH = 'french',
JAVA = 'java',
PYTHON = 'python',
HTML = 'html',
}
export function getTextToTypeLanguage(cat... |
af5fa205d06bae8fc48a653ddebb174fb3fc0935 | TypeScript | FarheenIqbal/assignment | /src/renameKeys.ts | 3.5625 | 4 | // replaces names of multiple object keys with values provided
type T = number | string | boolean
type A = { [key: string]: T }
type C = { [key: string]: string }
export function renameKeys(keysObject: C, object: A): A {
if (!keysObject || !object) {
return {}
}
const newObj: A = {}
const k1: string[] = O... |
4413ce16d0e7b4084efa46e733b0593bdd062cd0 | TypeScript | stjordanis/snyk | /test/jest/acceptance/snyk-monitor/project-attributes.spec.ts | 2.84375 | 3 | import { generateProjectAttributes } from '../../../../src/cli/commands/monitor';
import {
PROJECT_CRITICALITY,
PROJECT_ENVIRONMENT,
PROJECT_LIFECYCLE,
} from '../../../../src/lib/types';
describe('project attributes (--lifecycle, --environment, --business-criticality)', () => {
it('returns undefined when they... |
5da6f3028019de3bfca6fb52a1602f10670f8992 | TypeScript | ahayter-tombras/sfcc-types | /dw.util.d.ts | 2.96875 | 3 |
declare namespace dw.util {
declare class Collection<T> extends Object {
// constants
// -
// properties
get empty(): boolean
get length(): number
// constructors
// -
// methods
add(...values: Object): boolean
add1(object: Object): boolean
addAll(objs: Collection): boolean
clear(): void
co... |
daf6a47c688975bb7da5ffe0141e25a424286d7f | TypeScript | zhao-bin-zero/vue3-ssr-nestjs | /server/modules/cats/interfaces/cat.interface.ts | 3.375 | 3 | /**
* Interface cat
* 该文件导出一个cat的接口,用于实现不同文件之间的数据交互。在实际项目中,接口文件不仅仅用于项目中不同模块之间的数据交互,也为实现前后端的统一开发提供了条件。
*
* @export
* @interface ICat
*/
export interface ICat {
/**
* name field
*
* @type {string}
* @memberof ICat
*/
readonly name: string;
/**
* age field
*
* @type {number}
* @memb... |
ccf4d282fcae67e1586780adf246b7f3370bd0ee | TypeScript | VVladislaVLL/course_work_final | /src/game/models/plants/PotatoMine.ts | 2.75 | 3 | import Engine from '../../../engine';
import Cell from '../Cell';
import { PlantConfig } from '../../../types';
import Plant from '../Plant';
import Zombie from '../Zombie';
import Level from '../Level';
const READY_TIME = 15000;
const POSITION_ADJUST_Y = 10;
export class PotatoMine extends Plant {
private isAttack... |
91e7a7abc4c3402ed077789a2d26641bba0c22b6 | TypeScript | Timothy-Tolley/pc-slate-tools | /src/cart/get.ts | 2.65625 | 3 | import * as $ from 'jquery';
import { jsonFromjQuery } from './../jquery/';
import { ON_CART_FETCHED } from './events';
import {
addTask, removeTask, nextTask,
addFinishTrigger, errorQueue
} from './queue';
//Internally tracked variable for knowing the current cart data.
let currentCart = null;
//Internal method... |
acaca0e4d91fd93a59ba83d99cb820e6ba6bc738 | TypeScript | drumonii/LeagueTrollBuild | /frontend/projects/troll-build/src/app/model/champion-spell.ts | 2.625 | 3 | /**
* Champion spell.
*/
export interface ChampionSpell {
key: string;
name: string;
description: string;
tooltip: string;
}
|
4dd70f566a5d7d041e52c221a6079874c51dc5d2 | TypeScript | fahrisyany/AiChat-webapp | /src/tools/localStorage.ts | 2.65625 | 3 |
export const setLocalStorage = (payload: { item: string, title: string }) => {
localStorage.setItem(payload.title, payload.item);
}
export const getLocalStorage = (title: string) => {
return localStorage.getItem(title);
}
export const removeLocalStorage = (title: string) => {
localStorage.removeItem(ti... |
2c35168c2509f1c345ef15096029b22e94a45aa2 | TypeScript | Kava-Labs/javascript-sdk | /src/msg/hard/index.ts | 2.53125 | 3 | import { Coin } from '../../types/Coin';
function newMsgDeposit(depositor: string, amount: Coin[]) {
return {
type: 'hard/MsgDeposit',
value: {
depositor: depositor,
amount: amount,
},
};
}
function newMsgWithdraw(depositor: string, amount: Coin[]) {
return {
type: 'hard/MsgWithdraw'... |
853bac90b21d6eed4cf28fbe3632712b21e81436 | TypeScript | kleintody/snips-action-directions | /src/handlers/utils.ts | 2.578125 | 3 | import { config } from 'snips-toolkit'
import { WORK_SYNONYMS, HOME_SYNONYMS, TRAVEL_MODE_VARIABLES } from '../constants'
export const getCurrentLocation = function() {
if (config.get().currentLocation) {
switch (config.get().currentLocation) {
case 'work':
return getWorkLocatio... |
ef4f72c87b88ed78f516eccf37036a5b2530bcf7 | TypeScript | beszczur/TIwPR | /src/app/dataproviders/dataprovider.service.ts | 2.515625 | 3 | import {Injectable} from '@angular/core';
import {Http} from '@angular/http';
import {Day} from '../models/day';
import {Task} from '../models/task';
import {Event} from '../models/event';
@Injectable()
export class DataproviderService {
private address = '';
public plan: any[] = [
new Day(
'MONDAY',
... |
637c2885e165649392c65a1de7f83d06e1ed657b | TypeScript | tdude92/GalaxyGarden | /app/common/component/RigidBody.ts | 2.96875 | 3 | import * as THREE from 'three';
import { Orbit } from './Orbit'
export abstract class RigidBody {
/**
* Base class for any object that will be in motion
*/
position: THREE.Vector3;
solar_x_skew: THREE.Matrix4;
solar_y_skew: THREE.Matrix4;
// Rotation about axis
axialTilt: number;
... |
7e40aec9f0a6879575852b1b58e18b1f9a5183af | TypeScript | airbnb/visx | /packages/visx-zoom/src/util/matrix.ts | 3.15625 | 3 | import { TransformMatrix, Point } from '../types';
export function identityMatrix(): TransformMatrix {
return {
scaleX: 1,
scaleY: 1,
translateX: 0,
translateY: 0,
skewX: 0,
skewY: 0,
};
}
export function createMatrix({
scaleX = 1,
scaleY = 1,
translateX = 0,
translateY = 0,
skew... |
bcb89452f0ff9fb6cb397d5592ceac321cb703bb | TypeScript | yueecui/screeps-world | /src/creep/role/Carrier.ts | 2.53125 | 3 | import {
ENERGY_NEED, ENERGY_ENOUGH,
WORK_IDLE, WORK_TRANSPORTER_SPAWN, WORK_TRANSPORTER_TOWER, WORK_TRANSPORTER_STORAGE_ENERGY, WORK_TRANSPORTER_CONTROLLER,
MODE_SPAWN, MODE_CONTROLLER, WORK_TRANSPORTER_STORAGE_MINERAL, WORK_TRANSPORTER_TOMBSTONE, TRUE
} from '@/common/constant';
const IDLE_POS = { x: 28,... |
65772b4ed9f1a61007b967b9675b7b4ec9766d24 | TypeScript | MagdaSzade/fintech-challenge | /src/helpers/returnRateOFBasicInvest.ts | 2.921875 | 3 | import {BasicInvestition, BasicInvestitionReturnRate, PAYMENT_PERIODS} from './types';
export const returnRate = ({
initialCapital,
depositFrequency,
additionalContribution,
returnRate,
duration,
}: BasicInvestition): BasicInvestitionReturnRate => {
let depositValue = initialCapital;
let pr... |
ddd94783a7fcbc7e897c2fcd7dd5ada2024ca822 | TypeScript | tblong2105/CRUD-React-Redux-Typescripts | /FrontEnd/src/actions/Products.ts | 2.703125 | 3 | import {
CREATE_PRODUCT,
RETRIEVE_PRODUCTS,
UPDATE_PRODUCT,
DELETE_PRODUCT,
IS_SUCCESS,
IS_FAIL,
} from "./Types";
import ProductDataService from '../services/ProductService';
import { Dispatch } from 'react'
import { IBrand } from "../@types/Ibrand";
import { Iproduct } from "../@types/IProduct";
import { ... |
a814284c422e6d9bb0b100631821440899a63c31 | TypeScript | fransflippo/sfdx-ci-plugin | /src/helpers/certificateGenerator.ts | 2.796875 | 3 | import * as forge from 'node-forge';
export class CertificateAndPrivateKey {
public certificatePem: string;
public privateKeyPem?: string;
constructor(certificatePem: string, privateKeyPem?: string) {
this.certificatePem = certificatePem;
this.privateKeyPem = privateKeyPem;
}
}
export interface Gener... |
feb3f039f5b49fce11575d2700f6a848cfbbe137 | TypeScript | menucha-de/shared | /ui/projects/mica-shared/src/lib/mica-transport/models/store-action.model.ts | 2.546875 | 3 | export type Action = 'LOAD_ALL' | 'LOAD' | 'ADD' | 'EDIT' | 'REMOVE';
export const LOAD_ALL: Action = 'LOAD_ALL';
export const LOAD: Action = 'LOAD';
export const ADD: Action = 'ADD';
export const EDIT: Action = 'EDIT';
export const REMOVE: Action = 'REMOVE';
export interface StoreAction {
type: Action;
data: any... |
81bba69381807f539c61938750eb631a90106edf | TypeScript | kirpalmakanga/microtube | /@types/alltypes.d.ts | 2.515625 | 3 | export const SIZE_DEFAULT = 'default';
export const SIZE_MEDIUM = 'medium';
export const SIZE_HIGH = 'high';
declare global {
interface Window {
gapi: any;
}
}
interface DeviceData {
deviceId: string;
deviceName: string;
isMaster: boolean;
}
export interface File {
url: string;
}
expo... |
82ae19d555840a9bf72cce0ed63abd68fcd5813f | TypeScript | superpig/interpreter | /src/part7/__tests__/interpreter.test.ts | 3.265625 | 3 | import Lexer from '../spi/lexer'
import { TokenType } from '../spi/token'
import Interpreter from '../spi/interpreter'
import Parser from '../spi/parser'
describe('lexer', () => {
function makeLexer(text: string) {
const lexer = new Lexer(text)
return lexer
}
test('test_lexer_integer', () => {
const ... |
3ea95c3691ccb41ad9a8f06e356c52dc4a5fe4e8 | TypeScript | perfectyang/ts-react | /todo-list/src/typing/index.ts | 2.6875 | 3 | import React, {Dispatch, SetStateAction, useState} from "react";
export interface ITodo {
id: string;
content: string;
complete: boolean
}
export interface IDataList {
dataList: ITodo[],
deleteTodo: (id: string | number) => void
}
export interface IInputs {
value?: string,
addTodo: (todo:ITodo)... |
29b6b40937306295320e64c3b30e7746a30b91a7 | TypeScript | NepipenkoIgor/ts29022020 | /old/functions-this.ts | 3.265625 | 3 | function getFullName(this: { name: string, surname: string }) {
return `${this.name} ${this.surname}`
}
getFullName();
let account = {
name: 'Ihor',
surname: 'Nepipenko',
age: 33,
getFullName
}
account.getFullName();
type HandlerCb = (this: void, e: Event) => void
class UIElement {
addClic... |
f7d5ce3150f12d331b91912687356fcb5084ec29 | TypeScript | hourliert/redux-crud-observable | /src/errors/__tests__/ApiError-test.ts | 2.5625 | 3 | import ApiError from '../ApiError';
describe('ApiError', () => {
it('create an ApiError', () => {
const error = new ApiError();
error.data = 'Error';
error.status = 500;
expect(error).toBeInstanceOf(Error);
expect(error.data).toEqual('Error');
expect(error.status).toEqual(500);
});
});
|
7f9650e7f777ded7220e54db4a480031bdba2318 | TypeScript | SAP/ui5-webcomponents | /packages/main/src/types/CarouselPageIndicatorStyle.ts | 3.03125 | 3 | /**
* Different Carousel page indicator styles.
*
* @readonly
* @enum {string}
* @public
* @author SAP SE
* @alias sap.ui.webc.main.types.CarouselPageIndicatorStyle
*/
enum CarouselPageIndicatorStyle {
/**
* The page indicator will be visualized as dots if there are fewer than 9 pages.
* If there are more ... |
961611eeb70b336dee4895e38ba4f719c5aa26e4 | TypeScript | raziems/skinet | /client/src/app/basket/basket.service.ts | 2.546875 | 3 | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
import { map } from 'rxjs/operators';
import { environment } from 'src/environments/environment';
import { Basket, IBasket, IBasketItem, IBasketTotals } from '../shared/models/basket';
... |
888c45f9f8816d758855015073529e58eb38df83 | TypeScript | greghart/climbing-app | /src/typescript/models/User.ts | 2.75 | 3 | import {
Column,
Entity,
PrimaryGeneratedColumn,
ManyToOne,
OneToMany,
} from 'typeorm';
import { cascadeOneToMany } from '../db/cascadeOptions';
import Comment from './Comment';
import Photo from './Photo';
/**
* Users
*
* Users of the system.
*/
@Entity()
export default class User {
@PrimaryGenerate... |
1ec2522b4c75c2a5689de3216aa7288bc23e6d3d | TypeScript | luotaoyeah/learning-nodejs | /projects/12/src/book/learning-node-2e/03/03-01/03-01-01/03-01-01-D/03-01-01-D.ts | 2.96875 | 3 | /*
* 如果 module identifier 是一个 folder,
* 则 node 会寻找该 folder 下面的 package.json 的 main 属性指向的 module;
*/
console.log("\n-------------------------------------------------- 01");
/* { name: 'foo' } */
console.log(require("./folder-01"));
/*
* 如果 folder 下面没有 package.json,则寻找 index.js;
*/
console.log("\n--------------... |
17cdde153b9b87a8d305b3a8e2e63c89d4e3a316 | TypeScript | cflFullstackDocente/CFL2021 | /3.POO/tp-casino/Tragamonedas.ts | 2.625 | 3 | import * as rl from "readline-sync";
import GestorArchivos from "./GestorArchivos";
export default class Tragamonedas {
protected probabilidad: number;
protected gestorArchivos: GestorArchivos;
public constructor(txtConfiguracion: string, txtResultados: string) {
this.gestorArchivos = new GestorArchivos(txt... |
01b0e9589d7699de67ff6842ce7f4e9b80e891f4 | TypeScript | travelgateX/core-businessrules | /src/test_rules/rule_xgty.ts | 3.1875 | 3 | import { Rule } from "../main";
export class TestRuleXgtY implements Rule {
public status: boolean;
public msg: string;
public code: string;
private x: Number;
private y: Number;
constructor(code: string, x: Number, y: Number) {
this.code = code;
this.x = x;
this.y = y;... |
255441646644fc8a784a017bf079aaa697b4c664 | TypeScript | zhifuliu/generator-gulp-ts-requirejs | /src/app/startup-fail-backup.ts | 3 | 3 | /// <reference path="../references.d.ts" />
/*var $ = require('jquery');*/
/*import $ = require('jquery');*/
/*import $ = require("jquery");
class App {
public clickList = value => {
console.log(value);
};
private clickNum: number = 0;
public clickBtn = () => {
$('#msg').val((this.c... |
e6a169f98351a923afb5fecc58138e213115882a | TypeScript | xuandai-py/NG-xdBook-seller | /src/app/services/authentication.service.ts | 2.625 | 3 | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { BehaviorSubject, Observable } from 'rxjs';
import { environment } from 'src/environments/environment';
import { User } from '../models/user.models';
import {map} from 'rxjs/operators';
const API_URL = `${environment... |
b3345cc63fb2b1659db32bf92de1afee6564d747 | TypeScript | haandol/starhq | /src/decorator.ts | 2.625 | 3 | import * as _ from 'lodash';
import { IEvent } from './interface/event';
import { Metadata } from './interface/metadata';
function findEndpoint(endpoints: Array<any>, funcName: string): Metadata.Rest | null {
return _.find(endpoints, (endpoint) => endpoint.funcName === funcName);
}
export namespace Decorator {
e... |
e634d6769bd9070f0501cbd9ad593c552bd09ee4 | TypeScript | tofsjonas/tenancies | /src/lib/firebase/firebase_storage.ts | 2.5625 | 3 | import { Tenancy, TenancyMetaData, DB_ID } from 'types/global'
import db, { firestore } from 'lib/firebase/firebase.config'
import { User } from 'contexts/AuthContext'
type updateTenancyInStorageParams = {
id: DB_ID
data: TenancyMetaData
}
export const updateTenancyInStorage = async ({ id, data }: updateTenancyIn... |
9a8132df96fcada7716365fcbefc12e3f3357ef7 | TypeScript | svrucina/frontend | /src/app/pipes/custom-date.pipe.ts | 2.625 | 3 | import { Pipe, PipeTransform } from '@angular/core';
import {DatePipe} from '@angular/common';
@Pipe({
name: 'customDate'
})
export class CustomDatePipe implements PipeTransform {
transform(date: Date | string, format: string = 'dd.MM.yyyy. HH:mm'): string {
date = new Date(date); // if original type was a s... |
c4ef898746f5eafa06e5220c8501fb2273851573 | TypeScript | minhtran1995/Pirates-of-the-Caribbean | /Scripts/objects/player.ts | 2.53125 | 3 | /*
***************************************************************************************
* Source file name : player.ts *
* Author's name : Duc Minh Tran (300771859) *
* Last Modified by : Duc Minh Tran (300771859) ... |
ec31e350ee03803c71f80a0ebc3eeebdf080448f | TypeScript | buildmotion/better-business-logic-with-typescript | /DesignPatterns/composite/src/app/modules/pattern/rule-component.ts | 2.84375 | 3 |
import {IRuleComponent} from './../rule/rule-component.interface';
import {RuleResult} from './../rule/rule-result';
import {RenderType} from './../../rules/render-type.enum';
import {Severity} from './../../rules/severity.enum';
/**
* This is the base class for all rules. All rules will extend from this class. New ... |
e73506755f2a456e35bf3a7afbb2c0a8621f1479 | TypeScript | joetinoco/superslotmachine | /Scripts/scenes/menu.ts | 2.5625 | 3 | // MENU SCENE
module scenes {
export class Menu extends objects.Scene {
// MENU SCENE ++++++++++++++++++++++++++++
//
// Initial game screen with a "play" button
//
//PRIVATE INSTANCE VARIABLES ++++++++++++
private _playButton: objects.Button;
private... |
2ca2f5980a48d4b435e7e6768799f9476912333e | TypeScript | svenny96/webtech2 | /example08-presentation/src/main/angular/src/app/angular/create-news/create-news.component.ts | 2.625 | 3 | import { Component, EventEmitter, Output } from '@angular/core';
import { NewsService } from '../news.service';
@Component({
selector: 'create-news',
templateUrl: './create-news.component.html',
styleUrls: ['./create-news.component.sass']
})
export class CreateNewsComponent {
@Output()
public created = new ... |
e99e102ab67ed3665650df4e62adfef6597221c1 | TypeScript | j10wy/sandbox | /src/app/enum-select/enum-select.component.ts | 2.609375 | 3 | import { Component, OnInit } from '@angular/core';
type API = 'TEST' | 'ANOTHER_TEST';
type MODE = {
[key in API]: string;
};
@Component({
selector: 'app-enum-select',
templateUrl: './enum-select.component.html',
styleUrls: ['./enum-select.component.scss'],
})
export class EnumSelectComponent implements OnIni... |
8a290277d1a62ada7e20eec905c162fabe2bba2c | TypeScript | anthrio/shared | /src/middleware/current-user.ts | 2.5625 | 3 | import { Context, Next } from "koa";
import jwt from "jsonwebtoken";
interface UserPayload {
id: string;
email: string;
}
export const currentUser = (ctx: Context, next: Next) => {
if (!ctx.session?.jwt) {
return next();
}
try {
const payload = jwt.verify(
ctx.session.jwt,
process.env.JW... |
0e30432644d4dfa2745b67c3806775a132742cbe | TypeScript | OfficeDev/Office-Addin-Scripts | /packages/eslint-plugin-office-addins/src/rules/call-sync-before-read.ts | 2.546875 | 3 | import { TSESTree } from "@typescript-eslint/utils";
import { Variable } from "@typescript-eslint/utils/dist/ts-eslint-scope";
import { findTopMemberExpression } from "../utils/utils";
import { findOfficeApiReferences, OfficeApiReference } from "../utils/utils";
export = {
name: "call-sync-before-read",
meta: {
... |
9735f8ab6ef96706efd49409d70fdc475066220a | TypeScript | bgoonz/UsefulResourceRepo2.0 | /GIT-USERS/lydia/DefinitelyTyped/types/feedparser/feedparser-tests.ts | 2.640625 | 3 | import request = require('request');
import * as FeedParser from "feedparser";
const req = request('https://news.google.com/news?cf=all&hl=en&pz=1&ned=us&output=rss');
const feedparser = new FeedParser({});
req.on("error", error => {
// handle any request errors
});
req.on("response", res => {
if (res.statusCode... |
8174c4f4eaa2dbc2deda848547965b8b4bc5d63e | TypeScript | h3poteto/megalodon | /megalodon/src/misskey/web_socket.ts | 2.5625 | 3 | import WS from 'ws'
import dayjs, { Dayjs } from 'dayjs'
import { v4 as uuid } from 'uuid'
import { EventEmitter } from 'events'
import { WebSocketInterface } from '../megalodon'
import proxyAgent, { ProxyConfig } from '../proxy_config'
import MisskeyAPI from './api_client'
import { UnknownNotificationTypeError } from ... |
de193691bac0ed6c58586be7e8496b4baaa0fbe7 | TypeScript | JamesDunne/webmixer | /webmixer/src/compressor.ts | 2.578125 | 3 | import { dB_to_gain, gain_to_dB } from './util';
import { Parameter } from './parameter';
export class Compressor {
opts: any;
_threshold: Parameter;
_ratio: Parameter;
_knee: Parameter;
_attack: Parameter;
_release: Parameter;
_makeupGain: Parameter;
private compNode: DynamicsCompress... |
6d6a6f356a1e026255b5760f8f0c9915f03048f5 | TypeScript | anyone-oslo/pages | /app/javascript/controllers/LoginController.ts | 2.625 | 3 | import { Controller } from "@hotwired/stimulus";
export default class LoginController extends Controller {
declare readonly tabTargets: HTMLDivElement[];
static get targets() {
return ["tab"];
}
connect() {
if (this.tabTargets.length > 0) {
this.showTab(this.tabTargets[0].dataset.tab);
}
... |
866b84edaef61a55cc9f3ed5417e7391272f6a71 | TypeScript | pconeglian/b2b-cnae | /node/utils/companyInformation.ts | 2.6875 | 3 | import {CnaeOutput} from './cnae'
export function FormatInformation(response:any)
{
var mainCnae: CnaeOutput = {code: response.cnae_principal.codigo, description: response.cnae_principal.descricao}
var legalNature: LegalNature = {code: response.natureza_juridica.codigo, description: response.natureza_juridica... |
517940d1d6c7ab0c5ca5e22bc8c11874ce13e0f3 | TypeScript | a-bachelet/SeriousBambouApi | /src/fixtures/quizz-fixture.ts | 2.578125 | 3 | /**
* Models Imports
*/
import { Quizz, QuizzModel } from '../models/quizz';
/**
* Abstract Classes Imports
*/
import { AbstractFixture } from '../abstract/abstract-fixture';
/**
* Fixtures Imports
*/
import { ThemeFixture } from './theme-fixture';
/**
* QuizzFixture Class Definition
*/
export class QuizzFix... |
2e0071f2292206af5e2089d84de6f9f16287afb1 | TypeScript | nannany/shooting-game | /src/controller/MyAircraftView.ts | 2.859375 | 3 | import { MyAircraft } from "../domain/aircraft/MyAircraft";
export class MyAircraftView {
myAircraft: MyAircraft =MyAircraft.getInstance() ;
sprite: PIXI.Sprite;
// 弾の発射間隔
launchInterval: number;
// フレーム数がインクリメントされていく
counter: number=0;
// 移動速度
speed: number;
constructor( sprite: PIXI.Sprite, l... |
3aca3d175f671dab87e6fb9230d71071858b0bdf | TypeScript | Amourspirit/node-string-breaker | /src/index.ts | 3.75 | 4 | import { codePointFullWidth } from 'utf16-char-codes';
// #region enums
/**
* Split string kind
*/
export enum splitByOpt {
/** Split by Width */
width,
/**
* Split by word
* Defult
*/
word,
/** Split by line */
line
}
/**
* Line ending options
*/
export enum lnEndOpt {
/** Take no action *... |
abc1c2005c800d608679e4cec8e1a139a4244d04 | TypeScript | panozhan/quickpicks-admin | /src/app/services/common.service.ts | 2.59375 | 3 | import { Injectable } from '@angular/core';
import { GameWithID, Contest, Game } from '../models/interfaces';
@Injectable({
providedIn: 'root'
})
export class CommonService {
constructor() { }
dateWithMonth(date : string) : string{
let _month : string = date.slice(0,2);
let day : string = date.slice(3,... |
4cf7241dd8de4613b18ec3c935495d659426599b | TypeScript | DanielWilches/-Anotaciones-RxJs | /src/Operadores-Time/01-debounceTime.ts | 2.96875 | 3 | /**Video #58: operador debounceTime */
import { Observer, fromEvent, Observable, observable } from 'rxjs';
import { debounceTime, map, pluck, distinctUntilChanged } from 'rxjs/operators';
const observer: Observer<any> = {
next: value => console.log('next: ', value),
error: error => console.error('error: ', error),... |
5dc313db800837ce9478f54c63b6c47458082e26 | TypeScript | michaelcoxon/collections | /src/Enumerators/SelectEnumerator.ts | 3.140625 | 3 | import { IEnumerator } from "../Interfaces/IEnumerator";
import { Undefinable, Selector } from "@michaelcoxon/utilities/lib/Types";
import EnumeratorBase from "./EnumeratorBase";
import Exception from '@michaelcoxon/utilities/lib/Exceptions/Exception';
export default class SelectEnumerator<T, TReturn> extends Enumera... |
e54324e6cf5c6edb0ce1f233fe1048effeac1961 | TypeScript | richardpark-msft/azure-sdk-for-js | /sdk/keyvault/keyvault-common/src/challengeBasedAuthenticationPolicy.ts | 2.8125 | 3 | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
/* eslint-disable @azure/azure-sdk/ts-use-interface-parameters */
import { TokenCredential } from "@azure/core-http";
import {
BaseRequestPolicy,
RequestPolicy,
RequestPolicyOptions,
RequestPolicyFactory
} from "@azure/core-http";
impor... |
f3608484581d18a872c6de2e788322d8fdbb02d8 | TypeScript | cportillosv/ts-book-vs | /ts-book-vs/asynchronous.ts | 4.25 | 4 | //Callbacks and higher-order functions
var foo = function () // callback
{
console.log('foo');
}
function bar(cb: () => void) { // higher order function
console.log('bar');
cb();
}
bar(foo); //prints 'bar' then prints 'foo'
//Arrow functions
class Person {
name: string;
constructor(name: string... |
7d12a2f4f637c6e59d8610e5eaff6b2aa25b5eb0 | TypeScript | mmiszy/ddd-typescript | /src/modules/users/3-controllers-and-interface-adapters/createUserController.ts | 2.609375 | 3 | import { CreateUserUseCase } from '@modules/users/2-use-cases/createUser/createUserUseCase';
import { CreateUserRequestDTO } from '@modules/users/2-use-cases/createUser/createUserDTOs';
import * as BaseController from '@shared/3-controllers-and-interface-adapters/BaseController';
import { EmailAlreadyExistsError } from... |
e785be8379eaed9e2ede12b31270368b7b3a16e8 | TypeScript | github/vscode-codeql | /extensions/ql-vscode/src/model-editor/extensions-workspace-folder.ts | 2.71875 | 3 | import { FileType, Uri, window, workspace, WorkspaceFolder } from "vscode";
import { getOnDiskWorkspaceFoldersObjects } from "../common/vscode/workspace-folders";
import { extLogger } from "../common/logging/vscode";
import { tmpdir } from "../common/files";
/**
* Returns the ancestors of this path in order from furt... |
acd7410e325c9af02e52566cb08be783977c5c25 | TypeScript | fbiayna/BoardPub | /client/src/reducers/userReducer.ts | 2.703125 | 3 | import actionTypes from '../actions/actionTypes'
import { ActionUser } from '../utils/interfaces'
const initialState = {}
export default function userReducer (state: any = initialState, action: ActionUser) {
let newState = null
switch (action.type) {
case actionTypes.LOAD_USER:
newState = { ...state, us... |
6555c69f0d2afbe168b38d1ac936e538eb243684 | TypeScript | azat-io/scroogie | /src/utils/random-int.ts | 2.859375 | 3 | const randomInt = (min: number, max: number): number => {
const minNum = Math.ceil(min)
const maxNum = Math.floor(max)
return Math.floor(Math.random() * (maxNum - minNum + 1)) + minNum
}
export default randomInt
|
45e89256b8f64ad310249ef8fa3502d9d64d73bc | TypeScript | EasonApolo/forvera | /app/src/utils/common.ts | 2.859375 | 3 | export const formatDate = (ISODateStr: string): string => {
const date = new Date(ISODateStr)
return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())} ${pad(date.getHours())}:${pad(date.getMinutes())}`
}
const pad = (val: string | number): string => {
return val < 10 ? `0${val}` : `${val}... |
b1a71030d80078e461a7b80697f65dde9da86466 | TypeScript | JohnSteck9/weather-data-processing | /scripts/prefill.ts | 2.5625 | 3 | import mysql from 'mysql';
import Redis from 'ioredis';
import zlib from 'zlib';
import _ from 'lodash';
import { data } from '../src/hourly.json';
Promise.resolve()
.then(() => prefillMySql())
.then(() => prefillRedis())
.catch(error => console.error(error))
.finally(() => console.log('Finished'));
function ... |
1324b76533507e554d274cd679da74fa40bcc154 | TypeScript | JanusBifrons/EquinoxNode | /src/game/world/sector.ts | 2.703125 | 3 | namespace FireHare.Equinox {
export class District {
static DISTRICT_MIN: Vector = new Vector(0, 0);
static DISTRICT_MAX: Vector = new Vector(500, 500);
static LimitPositionToDistrict(cVector: Vector): Vector {
let nX: number = cVector.X;
let nY: number = cVector.Y;
... |
2c381960e79ad2851a7a7a84bb19372800775dfa | TypeScript | angrycans/RN-Unity-starter | /src/app/types.ts | 2.578125 | 3 |
enum ViewType {
GOODS = 0,
MEMBER,
NOCODE,
NUMBER_CONFIRM,
}
/**
* 分类item数据
*/
interface ICategoryItem {
name: string,
id: string,
parentId: string,
subCates: [{
name: string,
id: string,
parentId: string
}],
}
/**
* 商品详情
*/
interface IGoodsItem {
skuId?: string,
spuId?: string,... |
faf06e50151ef62f9095c64ea89e50d7d0da28a9 | TypeScript | tomaszdworniczak/CodersCamp2020.Project.FullStack-Node-React.TableSoccerTournaments | /frontend/src/restapi/players-profiles/PlayersProfilesRestApi.ts | 2.625 | 3 | import axios from "axios";
import { PlayerProfilesListDto } from "./PlayerProfilesListDto";
import { PlayerProfileDto } from "./PlayerProfileDto";
import { PATH_BASE_URL } from "../../components/atoms/constants/apiPaths";
export type UserProfilesRestApiConfig = {
readonly baseUrl: string;
};
const defaultConfig: Us... |
b7a5e4d967b9eefd6a0e2350d02788cee528a892 | TypeScript | MaxRyabets/angular_ssr | /src/app/infinite-loop-slider/infinite-loop-slider.component.ts | 2.578125 | 3 | import {
AfterViewInit,
ChangeDetectionStrategy,
Component,
ElementRef,
Inject,
Input,
PLATFORM_ID,
} from '@angular/core';
import SwiperCore, { Autoplay, Navigation } from 'swiper/core';
import Swiper from 'swiper';
import { Breakpoint } from './breakpoint';
import { isPlatformBrowser } from '@angular/co... |
56814426c8a39a0e61f1d3f518e6a825e6f07a3a | TypeScript | Koenkk/zigbee-herdsman | /src/adapter/z-stack/structs/entries/aps-link-key-data-table.ts | 2.890625 | 3 | /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import {Table} from "../table";
import {StructMemoryAlignment} from "../struct";
import {apsLinkKeyDataEntry} from "./aps-link-key-data-entry";
const emptyKey = Buffer.alloc(16, ... |
ee6a1664ab31543c41105cfc6d35e56dfc87efff | TypeScript | T99/ampel-frontend | /js/ts/helpers/builder-base.ts | 3.375 | 3 | /*
* Created by Trevor Sears <trevorsears.main@gmail.com>.
* 5:59 PM -- January 26th, 2019.
* Website: dashboard.ampelfeedback.com
*/
import InvalidArgumentsError from "../errors/invalid-arguments-error.js";
type BuilderRequirement = {
name: string,
isOptional: boolean,
isFulfilled: boolean;
value: any;
}... |
aa760cc0ec52881d6154dfc7e3468d330ec4602b | TypeScript | kendricktan/abstracted | /packages/frontend/src/containers/legos/use-legos.ts | 2.53125 | 3 | import { createContainer } from 'unstated-next'
import { useState } from 'react'
export enum LegoType {
CompoundSupply,
CompoundBorrow,
CompoundRepay,
CompoundWithdraw,
AaveFlashloanStart,
AaveFlashloanEnd,
UniswapV2SwapExactInToOut,
}
export interface Lego {
id: string
type: LegoType
args?: any[]... |
addc6cf4974c8d805cf37a7e7ea2d058799759ff | TypeScript | jifeon/sval | /src/state/symbols.ts | 3.296875 | 3 | import { hasOwn } from '../share/utils'
type VarType = 'var' | 'let' | 'const'
interface VarSymbol {
type: VarType
pointer: number
}
interface SymbolMap {
[name: string]: VarSymbol
}
export default class SymbolTable {
private table: SymbolMap = Object.create(null)
private pointer: number = 0
private rea... |
cbaacce6d4c9eb919a94ed56b055645ae9895288 | TypeScript | simrit1/oito | /src/geometry/Tetrahedron.ts | 3.03125 | 3 | import UniqueVertexGeo from "./extra/UniqueVertexGeo.js";
import Util from "./extra/Util.js";
class Tetrahedron {
static get( div=0, radius=1 ) : TGeo{
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
const base: TGeo = {
texcoord : [... |
2a15c1fd8b21a1051210e036387f6926036d8fef | TypeScript | tenna-llc/jest-coverage-report-action | /src/collect/counters.ts | 2.859375 | 3 | import { FileCoverage } from '../typings/JsonReport';
export const standardTotalCounter = (key: keyof FileCoverage) => (
value: FileCoverage
) => Object.values(value[key]).length;
export const standardCoveredCounter = (key: keyof FileCoverage) => (
value: FileCoverage
) => Object.values(value[key]).filter((hi... |
04f663b08a485b908a44ee5ac77e95c3e9438c99 | TypeScript | jogboms/EziNote | /src/app/library/store/store.ts | 3.28125 | 3 | import {Observable} from "rxjs/Observable";
import {BehaviorSubject} from "rxjs/BehaviorSubject";
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/scan';
import 'rxjs/add/operator/distinctUntilChanged';
/**
* Initial initializer Action for All Reducer functions within the Store
* @type {String}
*/
export c... |
b5a656e49dff62ee7062cdcde5889d1abecb84ed | TypeScript | masak/taocp | /src/ch2.2.4/ex5/circular-list.ts | 3.75 | 4 | export interface CircularList<T> {
ptr: ListNode<T> | NullLink;
}
export interface ListNode<T> {
info: T;
link: ListNode<T>;
}
export enum NullLink {
NULL,
}
export const Λ = NullLink.NULL;
function nodePointingToItself<T>(info: T): ListNode<T> {
let node = { info, link: (Λ as any) as ListNode<T>... |
dfe4dc343dd358d843598ba1d393effc8e4cd391 | TypeScript | Tollwood/got-store | /src/model/orderToken/orderToken.d.ts | 2.546875 | 3 | import { House } from '../player/house';
import { OrderTokenType } from './orderTokenType';
export declare class OrderToken {
private house;
private type;
private _value;
constructor(house: House, type: OrderTokenType);
getHouse(): House;
getType(): OrderTokenType;
readonly value: n... |
beb70ca832699b0904331ecadd76d00034b354e3 | TypeScript | ShenBao/angular-demo | /server/app/app.ts | 2.734375 | 3 |
import * as express from "express";
import * as path from "path";
import {Server} from "ws";
const app = express();
app.use('/', express.static(path.join(__dirname, '..', 'client')))
app.get('/api/stock', (req, res) => {
let result = stocks;
let params = req.query;
if(params.nam){
result = resu... |
8fcf7465bf7b3b069136fe29a56a6663c10921ad | TypeScript | mudakikwa/typescript-crash | /app.ts | 3.046875 | 3 | let sum:(a:number,b:number,c?:number) => number
const calcSum=(number1:number,number2:number) =>{
return number1+number2
}
calcSum(1,2,3) |
3c8ea309cf570087b810b072d60594310f7b49ea | TypeScript | BDav24/recipe-markdown | /src/recipeToMarkdown/ustensilsToMarkdown.ts | 2.671875 | 3 | import { Ustensil } from '../types'
import { isEmptyOrEmptyArray, joinNotEmpty, isNotEmpty } from '../utils'
import mediaToMarkdown, { getMediaType } from './mediaToMarkdown'
export default function ustensilsToMarkdown(ustensils: Ustensil[]): string {
if (isEmptyOrEmptyArray(ustensils)) return ''
return joinNotEm... |
1098762659841490d1317b6ba04094a8b0918fbd | TypeScript | nguyer/aws-sdk-js-v3 | /clients/node/client-support-node/types/_Attachment.ts | 2.8125 | 3 | /**
* <p>An attachment to a case communication. The attachment consists of the file name and the content of the file.</p>
*/
export interface _Attachment {
/**
* <p>The name of the attachment file.</p>
*/
fileName?: string;
/**
* <p>The content of the attachment file.</p>
*/
data?: ArrayBuffer | ... |
6f1b59f724db2ccb710b5ef9c4e526a09c754a47 | TypeScript | Jacks128/tytusx | /20211SVAC/G35/codigof/src/ejecucion/if.ts | 2.640625 | 3 | import { Instruccion } from "./instruccion";
export class If {
condicion: Instruccion;
instrucciones: Array<Instruccion>;
constructor(condicion: Instruccion, instrucciones: Array<Instruccion>){
Object.assign(this, {condicion, instrucciones});
}
}
|
06421c7b85fffd69b1ca64880f9081954a4f5dbf | TypeScript | narapov/TypeMonPress | /config/passport.ts | 2.671875 | 3 | import passport = require("passport");
import passportLocal = require("passport-local");
import { IUser, userModel } from "../models";
import { Request, Response, NextFunction } from "express";
const LocalStrategy = passportLocal.Strategy;
passport.serializeUser<IUser, String>((user, done) => done(undefined, user.id... |
d204b6cb293a044edff25dd793aca84063a4cf7d | TypeScript | ioaNikas/blockframes | /libs/movie/src/lib/movie/+state/movie.query.ts | 2.578125 | 3 | import { Injectable } from '@angular/core';
import { QueryEntity } from '@datorama/akita';
import { MovieStore, MovieState } from './movie.store';
import { Movie, MovieSale } from './movie.model';
@Injectable({
providedIn: 'root'
})
export class MovieQuery extends QueryEntity<MovieState, Movie> {
// @todo #643 cal... |