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 |
|---|---|---|---|---|---|---|
95c87aacf8d3780ce76efeb8c119b5f37f18fe67 | TypeScript | gellaig/boxorder | /boxorder-client/src/app/ecommerce/models/order.model.ts | 2.578125 | 3 | import { ProductOrder } from "./product-order.model";
import { Location } from "./location.model";
export class Order {
id: number;
dateCreated: string;
status : string;
location: Location;
totalOrderPrice: number;
orderProducts: ProductOrder[] = [];
constructor(id: number, status: string,o... |
74db4a88d1ca1770591fa7d9b255f8e98e2c92fd | TypeScript | jamashita/publikum | /packages/digest/src/Digest.ts | 2.796875 | 3 | import bcrypt from 'bcrypt';
const ROUNDS: number = 14;
export class Digest {
public static async generate(str: string): Promise<string> {
const salt: string = await bcrypt.genSalt(ROUNDS);
return bcrypt.hash(str, salt);
}
public static compare(str: string, hash: string): Promise<boolean> {
return... |
f41c819e093877cb198eeec20ec9528140cb2fc7 | TypeScript | alfredohugueth/NodeJSTest | /src/controllers/products.controller.ts | 2.625 | 3 | /* Functional Imports*/
import { request, Request, Response } from "express";
import HttpStatusCode from "../interface/HttpStatusCode";
/* Database Import*/
import { connect } from "./database";
/* Querys */
import Querys from "../querys/products.query";
/* Interfaces */
import Query from "mysql2/typings/mysql/lib... |
5ebb05f9f5a99c9f18a73c6603ddf091649f4b32 | TypeScript | Irev-Dev/React-hook-lazy-loading-pattern-demo | /src/useTabData.ts | 2.875 | 3 | import { useState, useEffect } from "react";
import { useStore } from "./store";
export const useTabData = (
tab: "sweet" | "rad"
): { data: string[]; loading: boolean; error: string } => {
const [isLoading, setIsLoading] = useState<boolean>(true);
const [state, dispatch] = useStore();
const coolData = state &... |
53a1cd9c71808c4f0ba3daa4510baa1433939811 | TypeScript | ctrl-freaks/freezeframe.js | /packages/angular-freezeframe/projects/angular-freezeframe/src/lib/angular-freezeframe.component.spec.ts | 2.546875 | 3 | import { Component } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { AngularFreezeframeComponent } from './angular-freezeframe.component';
const src = 'http://localhost:8080/foo.gif';
@Component({
template: `
<angular-freezeframe>
<img [src]="src" alt="one... |
dea686d65b99886a5e6ca02074272fdb35c91d3e | TypeScript | atSistemas/angular-base | /src/base/shared/spec/BaseError.shared.spec.ts | 2.609375 | 3 | import { expect } from 'chai';
import { BaseError } from '../BaseError';
describe('shared / Errors', () => {
describe('Error', () => {
it('should be an Error prototype', () => {
const err = new BaseError('foo');
const isErr = err instanceof Error;
expect(isErr).to.equal(true);
});
i... |
ea3a0dc5e833558094d7b6942c50f4c2bfd57a5d | TypeScript | getsentry/sentry-javascript | /packages/tracing-internal/src/browser/metrics/utils.ts | 2.984375 | 3 | import type { Transaction } from '@sentry/core';
import type { Span, SpanContext } from '@sentry/types';
/**
* Checks if a given value is a valid measurement value.
*/
export function isMeasurementValue(value: unknown): value is number {
return typeof value === 'number' && isFinite(value);
}
/**
* Helper functio... |
82ed1f4c4147a9c6f63712152662cd81c185afe4 | TypeScript | memorycero/ui-aws-release-info | /src/api/amazonaws.api.ts | 2.59375 | 3 | import Axios, { AxiosError } from "axios";
import { baseApiUrl } from '../core/const';
export interface BuildInfoApi {
rt: string,
team: string,
branch?: string,
status?: string,
step?: string,
id?: number,
build?: string
}
export const lastWeekReleasesInfoUrl = `${baseApiUrl}/latest/week`... |
0cf4c42de30fdadbdbd6697c4666b56610840285 | TypeScript | raveeshm2/trello-dashboard | /src/forms/validators.ts | 2.5625 | 3 | import * as yup from "yup";
export const AddListItemValidationSchema = yup.object({
title: yup.string().required('Title is required'),
body: yup.string().required('Body is required')
});
export const AddListValidationSchema = yup.object({
title: yup.string().required('Title is required').test('duplicate',... |
ec6378f09a28dfcb71809efeac76e094ee44cea7 | TypeScript | dminatto/maryhelp-api | /src/App/Routes/CadastroRoute.ts | 2.546875 | 3 | import * as express from 'express';
import * as httpStatus from 'http-status';
import Controller from '../Controllers/UsuarioController'
class CadastroRoute {
private app: express.Application;
constructor(app) {
this.app = app;
this.listaRotas();
}
listaRotas() {
/**
... |
ea5f538d4e8e21640ac88e9e917b644de2a44478 | TypeScript | gonalobernad/unique-grade-values | /src/app/app.component.ts | 2.859375 | 3 | import { Component, Output } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'codeChallenge';
gradeA;
gradeB;
gradeC;
constructor(){
this.gradeA = [12, 15, 11, 17, 19];
thi... |
bdaa9e1d4d046cdb177da7ce5e9d7bae08e6195a | TypeScript | undym/rsm | /src/mix.ts | 2.765625 | 3 | import { Util, Flag } from "./util.js";
import { Color } from "./undym/type.js";
import { Item } from "./item.js";
import { Player } from "./player.js";
import { Eq, EqEar } from "./eq.js";
import { Prm } from "./unit.js";
import { SaveData } from "./savedata.js";
import { Dungeon } from "./dungeon/dungeon.js";
import ... |
f1b835d3dcbecdc33645582cecdfc2bccdbf224e | TypeScript | graphql-extended/gqlx-js | /src/helpers/transpile.test.ts | 2.5625 | 3 | import { transpileNode } from './transpile';
describe('transpileNode', () => {
it('serializes a simple addition correctly', () => {
const result = transpileNode(
{
type: 'BinaryExpression',
left: {
type: 'Identifier',
name: 'a',
},
right: {
... |
48fd3ed33a92887211aa7965694fa9f6d322e40a | TypeScript | gitsupportting/ReactNative_GraphQL | /apps/mobile-v1/types/redux-thunk.d.ts | 2.890625 | 3 | import { Action, Dispatch } from 'redux';
type ThunkAction<R, S, E, A extends Action> = (dispatch: Dispatch, getState: () => S, extraArgument: E) => R;
/**
* Redux behaviour changed by middleware, so overloads here
*/
declare module 'redux' {
/*
* Overload to add api middleware support to Redux's dispatch(... |
ff4721f6b9b107b72274f4a469bc32084b6ff4e3 | TypeScript | kkalamarski/redshift | /packages/core/parser/tests/strings.test.ts | 3.140625 | 3 | import { evaluate, compile } from "../../index"
describe("Strings", () => {
it("should parse string", () => {
const code = `
let test = "a string"
test
`
const result = evaluate(code)
expect(result).toBe("a string")
})
it("should concat two strings", () => {
const code = `
... |
5afbe5606c5d0c11e31fe06471622804d99d11f9 | TypeScript | matt-winfield/raytracing | /src/classes/Segment.ts | 3.1875 | 3 | import { Color } from "./Color";
import { Drawable } from "./interfaces/Drawable";
export class Segment implements Drawable {
private x: number;
private height: number;
private width: number;
private color: Color;
private brightness: number;
constructor(x: number, height: number, width: number, color: Color, br... |
11b6e9ad9c91754b253922e84ba73680f7328feb | TypeScript | amoschoomy/pongrxjs | /pong.ts | 3.0625 | 3 | import { interval, fromEvent, from, zip, NextObserver, ObjectUnsubscribedError, Observable, timer, of, merge, pipe } from 'rxjs'
import { map, scan, filter, flatMap, take, concat, takeUntil, takeWhile, groupBy, repeat, startWith, switchMap, first, publish, last, reduce,} from 'rxjs/operators'
//Class RNG to generate p... |
f1595342264191577615c9f5531069db64bd697a | TypeScript | dps/notable | /src/renderer/utils/path.ts | 3 | 3 |
/* IMPORT */
import * as filenamify from 'filenamify';
import * as fs from 'fs';
import * as path from 'path';
import * as pify from 'pify';
/* PATH */
const Path = {
_allowedPaths: {}, // Map of filePath => timestamp, ensuring we don't return the same path mutliple times within some amount of time, in order to ... |
1e18c66d929335a4f651c325f3ff2e997baa9579 | TypeScript | DiceGraph/DiceGraph | /source/util/text.ts | 2.640625 | 3 | export const textCut = (str: string, maxLen: number) => {
return str.length > maxLen - 3 ? str.slice(0, maxLen - 3) + '...' : str
} |
aaa56f29c7b5d42ceaf3a7ea628b7b21b33ad62c | TypeScript | lhoang/advent-of-code-2019 | /src/day4/secure-container.spec.ts | 2.78125 | 3 | import {
containsDouble,
findAllPossiblePasswords,
findAllPossiblePasswordsWithOneDouble,
hasAdjacentNumbers,
onlyIncrease,
} from "./secure-container";
describe('Secure Container', () => {
it('should find adjacent numbers', () => {
expect(hasAdjacentNumbers('111345')).toBeTruthy();
... |
b7091dae7f53e614fd6c209d7008b0b440e1ebaf | TypeScript | agawrysiuk/the-ring-2.0 | /the-ring-client-angular/src/app/modules/menu/pages/game/model/deck.ts | 2.609375 | 3 | import {Card} from "./card";
export class Deck {
commander: string;
cards: Card[];
constructor(commander: string, cards: Card[]) {
this.commander = commander;
this.cards = cards;
}
}
|
6a89770ee625178e47ec4a51b1a82222be70ecbf | TypeScript | ahmdammarr/cyper-shop-app | /src/store/categories/categoriesSlice.ts | 2.515625 | 3 | import { createAsyncThunk, createSlice } from "@reduxjs/toolkit";
import { RootState } from "../store";
import axios from "axios";
import { CategoriesState } from "./types";
const initialState: CategoriesState = {
categories: [],
status: "loading",
};
export const getCategories = createAsyncThunk(
"catego... |
301fa6a311f5ddb8a1a133184ecc4969f4a22c88 | TypeScript | ramzan545/jiber | /packages/jiber-client/src/store/room.test.ts | 2.703125 | 3 | import { JOIN_ROOM } from 'jiber-core'
import { Room } from './room'
let dispatchCalledWith: any[] = []
const store = {
dispatch: (action: any) => {
dispatchCalledWith.push(action)
},
getState: () => {
return {
rooms: {
room1: { confirmed: 'one', optimistic: 'two', members: {} }
},
... |
b63e515e0beb9e8ec330169bcc9eaf527bb63bee | TypeScript | antondavidenko/threejs-test-game | /src/components/characters/characters-collection.component.ts | 2.625 | 3 | import { Character } from '@antondavidenko/modular-character-threejs';
import { playerCharacter, friendsCharacters, enemiesCharacters } from './controls';
class CharactersCollection {
init(scene: THREE.Scene, callback: () => void): void {
playerCharacter.init(scene, callback);
enemiesCharacters.init(scene);... |
e64862289c13bdd437cc49d52977ec61a7f7ff4b | TypeScript | stuyy/discord-dashboard-livestream-repo | /codering-bot-nest/src/database/schemas/bot/Command.ts | 2.84375 | 3 | import * as mongoose from 'mongoose';
/**
* BASIC - All users can use this, no permissions
* MODERATION - Only Moderation Roles can use these commands
* ADMIN - Only Admin Roles can use these commands
* OWNER - Only the owner can use these commands
*/
export const CommandSchema = new mongoose.Schema({
name: {
... |
8f8f68f30cc9c8824ae250a51167100ffeeb46fb | TypeScript | chromium/chromium | /tools/json_schema_compiler/test/idl_basics_expected.d.ts | 2.578125 | 3 | // Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* @fileoverview Definitions for chrome.idl_basics API
* Generated from: file.idl
* run `tools/json_schema_compiler/compiler.py file.idl -g ts_definitions` to
* regenera... |
e0e5a67d7b3b917b8e19affae6d7368e70ece3b6 | TypeScript | Wahbi90/kofti | /frontend/src/redux/products/productsActions.ts | 2.65625 | 3 | import {
FETCH_PRODUCTS,
FILTER_PRODUCTS_BY_SIZE,
ORDER_PRODUCTS_BY_PRICE,
CHANGE_CATEGORY,
} from './productsTypes';
export const changeCategory = (category) => ({
type: CHANGE_CATEGORY,
payload: category,
});
export const fetchProducts = () => (dispatch) => {
fetch('http://localhost:8000/products')
... |
0a779a664c82afd40d2f9f3f27ae831f71fbab2d | TypeScript | benzhemin/typescript-demo | /src/simpleInherit.ts | 3.515625 | 4 | export {}
function Foo(who) {
this.me = who;
}
Foo.prototype.identify = function() {
return `I am ${this.me}`;
}
function Bar(who) {
Foo.call(this, who);
}
// inheritance
Bar.prototype = Object.create(Foo.prototype);
Bar.prototype.speak = function() {
console.log(`hello, ${this.identify()}.`)
}
const b1 ... |
d20c3d7807464d4b1458f4c77723b7748ad8a111 | TypeScript | theresasogunle/paymentAPI | /src/helpers/user.helpers.ts | 2.6875 | 3 | import { Gender, prisma, User } from "../schema/generated/prisma-client";
const dateFormat = require("dateformat");
const bcrypt = require("bcryptjs");
import { sign } from "jsonwebtoken";
import { salt } from "../const";
import mail from "../functions/mail";
import { verifyToken } from "../middleware/utils";
require("... |
95b5c9ae72d777618e386047fd55ce8cd437ed5e | TypeScript | cesargalindo/prysm-web-ui | /src/app/modules/core/validators/password.validator.spec.ts | 2.84375 | 3 | import { AbstractControl, FormBuilder, FormControl } from '@angular/forms';
import { PasswordValidator } from './password.validator';
describe('PasswordValidator', () => {
describe('Password strength checks', () => {
it('should error if password does not contain uppercase characters', () => {
const valida... |
ab8e06126b6f677e5af20db0e9b708964393817f | TypeScript | pxapi/click-in-group-select | /src/plugin.ts | 2.5625 | 3 | /*
Double Click in a group selects clicked element in group
Source https://github.com/fabricjs/fabric.js/issues/6776#issuecomment-783326800
Author: @harm-less
*/
import { fabric } from 'fabric';
export class ClickInGroupSelectPlugin {
canvas: fabric.Canvas;
private _cachedGroups: Array<CachedGroup> = [];
c... |
ecd18363703501f050d65c0b18de8492ddc028e9 | TypeScript | musa-zulu/DotNetArchitecture | /Web/UserInterface/ClientApp/src/app/shared/services/validation.service.ts | 2.625 | 3 | import { Injectable } from "@angular/core";
@Injectable({ providedIn: "root" })
export class ValidationService {
private date = /^((((0?[1-9]|[12]\d|3[01])[\.\-\/](0?[13578]|1[02])[\.\-\/]((1[6-9]|[2-9]\d)?\d{2}))|((0?[1-9]|[12]\d|30)[\.\-\/](0?[13456789]|1[012])[\.\-\/]((1[6-9]|[2-9]\d)?\d{2}))|((0?[1-9]|1\d|2[0-8]... |
bd1e9335a3fedee069e6fb4c4045eddd0116b034 | TypeScript | GAMS-Organization/GAMS-Repository | /packages/api/src/Application/Handlers/Users/UpdateUserHandler.ts | 2.5625 | 3 | import IUserRepository from '../../../Domain/Interfaces/IUserRepository';
import { inject, injectable } from 'inversify';
import { INTERFACES } from '../../../Infrastructure/DI/interfaces.types';
import UpdateUserCommand from '../../Commands/Users/UpdateUserCommand';
import User from '../../../Domain/Entities/User';
im... |
51eaede4ae52bad0a9c1bdf411728b43aa73b89b | TypeScript | angular-berlin/ngry-chat | /src/app/core/text-analysis.service.ts | 2.71875 | 3 | import {Injectable} from '@angular/core';
import {HttpClient, HttpHeaders} from '@angular/common/http';
import {SentimentResult} from '../models/sentiment-result';
import {Observable} from 'rxjs';
import {LanguageCode} from '../models/language-code-enum';
import {environment} from '../../environments/environment';
impo... |
f4f4ad675abdce54aebe002ead7acfd94c5db4f6 | TypeScript | jamesmilord/reddit-application | /src/app/reddit.service.ts | 2.546875 | 3 | import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import 'rxjs/Rx';
@Injectable()
export class RedditService {
http:any;
url:string;
favorites=[];
favoritesCounts:number;
constructor(http:Http) {
this.http = http;
this.url = 'https://www.reddit.com/r';
}
fetchpos... |
0e1b3f21f70292720a8b18b0a8598441de19b1d6 | TypeScript | tedchoward/advent-of-code-2018 | /src/08/__tests__/sum-values.test.ts | 2.609375 | 3 | import { parser } from '../parser';
import { sumValues } from '../sum-values';
describe('sumValues', () => {
it('adds up the values of the nodes', () => {
const input = '2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2'.split(/\W/).map(s => parseInt(s, 10));
const tree = parser(input);
const sum = sumValues(tree);
... |
e519796b0d065dd8d28d296c0ee9f4970c4abc74 | TypeScript | brahms116/datecounterReact | /src/services/DbService.ts | 2.578125 | 3 | import IDateItemResponse from "../models/outputModels/IDateItemResponse";
import IGetItemsResponse from "../models/outputModels/IGetItemsResponse";
import ILoginResponse from "../models/outputModels/ILoginResponse";
import IRegisterResponse from "../models/outputModels/IRegisterResponse";
const url = "https://backend.... |
5cbb16fe2b0ba1cb2a77b8b9429243556c499bb9 | TypeScript | arthurshayne/finisher | /src/extension.ts | 2.578125 | 3 | 'use strict';
import * as vscode from 'vscode';
export function activate(context: vscode.ExtensionContext) {
console.log('decorator sample is activated');
// create a decorator type that we use to decorate small numbers
const loggerDecoration = vscode.window.createTextEditorDecorationType({
backgroundColor: '... |
06b51acef31aab5b420d69b72c70ab5e7e5c8dcb | TypeScript | RichCannon/test_halo_lab | /client/src/logic/saga/orderSaga.ts | 2.734375 | 3 | import { Action } from '@reduxjs/toolkit';
import { AxiosResponse } from 'axios';
import { call, put, takeLeading } from 'redux-saga/effects';
import { api } from '../api/api';
import { orderActions, OrderResponseT } from '../reducers/orderReducer';
// Функция-генератор для обработки запроса через сагу
func... |
887ef423ff5408762f5b3227f722d0f08107da95 | TypeScript | xchsp/Weakling | /entities/item.ts | 2.84375 | 3 | import {itemsData} from "../data/itemsData.js";
export default class Item implements ItemData{
public itemId: string;
public displayName: string;
public description: string;
public possibleSlots: Slots[];
public sprite: SpriteParameters;
public stackable: boolean;
public modified: boolean;
... |
77756af626dfaade92946609f64b8e2ad3d62b57 | TypeScript | runem/web-component-analyzer | /src/analyze/flavors/lwc/discover-members.ts | 2.59375 | 3 | import { Node, PropertyLikeDeclaration, PropertySignature, SetAccessorDeclaration } from "typescript";
import { ComponentMember } from "../../types/features/component-member";
import { getMemberVisibilityFromNode, getModifiersFromNode } from "../../util/ast-util";
import { getJsDoc } from "../../util/js-doc-util";
impo... |
e211ad0a5a775728c65019d7b1b7069cab56d260 | TypeScript | wenshunxin/angular6 | /src/app/shared/pipes/time1.pipe.ts | 2.984375 | 3 | import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'time1'
})
export class Time1Pipe implements PipeTransform {
transform(value: any, args?: any): any {
let dateTimeStamp = new Date(value).getTime();
var minute = 1000 * 60; //把分,时,天,周,半个月,一个月用毫秒表示
var hour = minute *... |
a6b2af31d00904167c9275ed76a4098797c3a0d7 | TypeScript | zaydek/retro-legacy | /go/scripts/types.ts | 2.734375 | 3 | // Props describes props ambiguously.
export type Props = { [key: string]: any }
// DescriptiveServerProps describes props ambiguously and the current path.
export type DescriptiveServerProps = Props & { path: string }
// ServerRouter describes the server-resolved router.
export interface ServerRouter {
// The stati... |
8db9da69cb9e3e1970da75c002e51374bdb1f576 | TypeScript | LancerComet/node-ftp | /src/cmder/cmds/cmd.quit.ts | 2.609375 | 3 | import Client from '../../client'
/**
* Quit Command.
* Drop connection gracefully.
*
* @export
* @param {string} clientInput - Content sent from client, Always be "quit".
* @returns {boolean}
*/
export default function QUIT (clientInput: string, client: Client) : boolean {
client.disconnect()
return true
... |
6b40485e16f7481591990d4cff6d8ae7272b8eef | TypeScript | swc-project/swc | /crates/swc_ecma_parser/tests/tsc/computedPropertyNames10_ES5.ts | 2.609375 | 3 | // @target: es5
var s: string;
var n: number;
var a: any;
var v = {
[s]() { },
[n]() { },
[s + s]() { },
[s + n]() { },
[+s]() { },
[""]() { },
[0]() { },
[a]() { },
[<any>true]() { },
[`hello bye`]() { },
[`hello ${a} bye`]() { }
} |
92c8842883d2672b5765641478884e3667afa086 | TypeScript | rqbazan/zeit-toast-clone | /src/helpers/inverse-indexed-queue.ts | 3.53125 | 4 | import { Indexable } from '../types'
/**
* Keeps the index property of the items in the inversed order, also it
* has a static capacity which is required by default.
*
* [{ index: n - 1 }, { index: n - 2 }, ..., { index: 0 }]
*/
class InverseIndexedQueue<Item extends Indexable> {
private capacity: number
rea... |
d26195d7e79a446693bd1423982264507b93adda | TypeScript | smartdata-sdei/angular_sample_code | /src/app/core/directives/number-only.directive.ts | 2.625 | 3 | import { Directive, ElementRef, HostListener, Input } from '@angular/core';
@Directive({
selector: '[appNumberOnly]'
})
export class NumberOnlyDirective {
constructor(private _el: ElementRef) { }
@HostListener('keydown', ['$event']) onKeyDown(evt: KeyboardEvent) {
var charCode = (evt.which) ? evt.which :... |
85d52d847806cb0dfe5401eee3bc8389851d4051 | TypeScript | benfortenberry/mazeofmonsters | /src/providers/countdown-service.ts | 2.6875 | 3 | import { Injectable } from '@angular/core';
import { timer, Subject, Observable } from 'rxjs';
import { takeWhile, map } from 'rxjs/operators';
@Injectable()
export class CountdownService {
private _countdown = new Subject<number>();
private isCounting = false;
public count;
private timer;
public m... |
4ee93237a02921afc90577071e31c4ec7b5843a1 | TypeScript | fevalani/pokedex-back-end | /tests/factories/pokemonFactory.ts | 2.8125 | 3 | import { getRepository } from "typeorm";
import faker from "faker";
import Pokemons from "../../src/entities/Pokemons";
interface Pokemon {
name: string;
number: number;
image: string;
weight: number;
height: number;
baseExp: number;
description: string;
}
export function createPokemon() {
const pokem... |
f669b09f8feea992a88716d9a1deb05a448d10a7 | TypeScript | fizk/NewBuzz | /src/elements/PatternColumnCount.ts | 2.640625 | 3 | import Node from './Node';
import {NOTE_TYPE} from "../types/NOTE_TYPE";
export default class PatternColumnCount extends Node {
label: string;
hightlight: boolean = false;
constructor(key: any, label) {
super(key);
this.type = NOTE_TYPE.IN_LINE;
this.label = label;
}
get h... |
fb8681c7053441f79fbb860eb6c3a8bc8c5ff051 | TypeScript | routexjs/deroutex | /tests/error.test.ts | 2.703125 | 3 | import { superdeno } from "https://deno.land/x/superdeno@main/mod.ts";
import {
Deroutex,
ErrorWithBody,
ErrorWithStatusCode,
ICtx,
Router,
TextBody,
} from "../mod.ts";
Deno.test("It handles 404", async () => {
const app = new Deroutex();
await superdeno(app.handler)
.get("/")
.expect(404);
}... |
6fa6a15eb3dbf866e825bc3a936498258240a73a | TypeScript | dvens/atomify | /packages/kit/src/utilities/inview/utils/build-treshhold-list.ts | 2.984375 | 3 | /**
* @export
* @returns { array }
*/
export function buildThresholdList() {
const numSteps = 1000;
const thresholds = [];
for (let i = 1.0; i <= numSteps; i++) {
const ratio = i / numSteps;
thresholds.push(ratio);
}
thresholds.push(0);
return thresholds;
}
|
c66152e57ae99d3638e60ebf53b0a912db55532e | TypeScript | christophgysin/aws-sdk-js-v3 | /deno/smithy-client/client.ts | 2.546875 | 3 | import { constructStack } from "../middleware-stack/mod.ts";
import { Client as IClient, Command, MetadataBearer, MiddlewareStack, RequestHandler } from "../types/mod.ts";
export interface SmithyConfiguration<HandlerOptions> {
requestHandler: RequestHandler<any, any, HandlerOptions>;
/**
* The API version set i... |
5db7f47310fef5cc20d18a0aa882faa5f7edae3b | TypeScript | kawamurashin/DecimalClockSVGTypeScript | /src/analog/hands/SecondHand.ts | 2.734375 | 3 | ///<reference path="../../decimal/DecimalTime.ts"/>
namespace hands {
import DecimalTime = decimal.DecimalTime;
export class SecondHand extends Hand {
constructor(svg: HTMLElement) {
super(svg);
this._radius = 100;
this._path.setAttribute("stroke", "#333");
... |
8a2f4422a09223d2295b9ac5b19149657e7dce69 | TypeScript | kwhong95/ts_study | /SkillsForProductivity/TypeInference/src/3.ts | 2.84375 | 3 | export {};
const arr1 = [10, 20, 30];
const [n1, n2, n3] = arr1;
// arr1.push('a');
const obj = { id: 'abcd', age: 123, language: 'korean' };
const { id, age, language } = obj;
// console.log(id === age); |
b201dd3ad6686ed25ae418c744a62c085d4a7886 | TypeScript | david2999999/PokeLegend-Angular | /src/app/shared/models/pokemon-pc/pokemon-box.model.ts | 3.21875 | 3 | import { Pokemon } from '../pokemon/pokemon.model';
export class PokemonBox {
constructor(private pokemonList : Pokemon[] = [], private maxCapacity: number = 30) {}
addPokemon(pokemon: Pokemon) {
if (this.pokemonList.length >= this.maxCapacity) {
return false;
}
... |
dfaa968e2d62a646594ad56ae04acc2f8374aad9 | TypeScript | daretodave/ursa-service | /lib/model/user/user.ts | 2.546875 | 3 | import {Table, Column, Model, HasMany, Unique, AutoIncrement, PrimaryKey, NotEmpty} from 'sequelize-typescript';
import {JWT_SECRET} from "../../config";
const jwt = require('jsonwebtoken');
@Table
export default class User extends Model<User> {
@PrimaryKey
@AutoIncrement
@Column
id: number;
@Uni... |
cb7831ff5be63a9de51193809f71bc4dca25ec0b | TypeScript | nocch12/DevChallenges-Auth-App | /resources/js/validation/responseValidation.ts | 3.265625 | 3 | type ErrorMessage = string | string[];
type ResponseErrors = {
[key: string]: ErrorMessage;
}
type FormatErrors = {
[key: string]: string;
}
export const makeErrorMessage = (errors: ErrorMessage): string => {
if(!errors.length) return '';
if(Array.isArray(errors)) {
return errors[0];
}
return errors;... |
ef1a8c8298c837410dac5e0b60c824ff04c2f1ba | TypeScript | liruidong1/algorithm011-class01 | /Week_01/plus-one.ts | 3.578125 | 4 | function plusOne(digits: number[]): number[] {
for (let i = digits.length - 1; i >= 0; i--) {
digits[i]++; //等价于 digits[i] += 1
digits[i] %= 10;
if (digits[i] !== 0) {
//不等于0证明无进位
return digits;
}
}
//走到此处,证明有进位,且是[9], [9,9], [9,...,9]这种特殊情况
let ... |
853feb1206383e6c72816df582190fee6d4ce69f | TypeScript | RaduW/TsTests | /src/ts/tree.spec.ts | 2.921875 | 3 |
import HierarchyWalker = ModificationEditor.HierarchyWalker;
import HtmlNavigator = ModificationEditor.HtmlNavigator;
import HtmlHierarchyWalker = ModificationEditor.HtmlHierarchyWalker;
import getSoforHtmlNodePath = ModificationEditor.getSoforHtmlNodePath;
interface ITestNode{
type:string;
id: string;
par... |
7147bfd64ac4986d27c4ace7456a855a99936f49 | TypeScript | dotCMS/dotcms-webcomponents | /src/utils/utils.spec.ts | 2.71875 | 3 | import {
getClassNames,
getDotOptionsFromFieldValue,
getErrorClass,
getHintId,
getId,
getLabelId,
getOriginalStatus,
getStringFromDotKeyArray,
getTagError,
getTagHint,
isFileAllowed,
updateStatus
} from './utils';
describe('getClassNames', () => {
it('should return f... |
d0c76da24d135fb948a06c04c2ef10f19722d60a | TypeScript | Maria-Eduarda-080902/arcade | /base/004/solver.ts | 3.5 | 4 |
class Grafite {
calibre: number;
dureza: string;
tamanho: number;
constructor(calibre: number, dureza: string, tamanho: number) {
this.calibre = calibre;
this.dureza = dureza;
this.tamanho = tamanho;
}
gastoPorFolha(): number {
if (this.dureza === 'HB')
... |
f49aa011d3a6de5ff92be4a098861733a1252201 | TypeScript | TylorS167/167 | /src/list/aperture/types.ts | 2.578125 | 3 | export interface ApertureArity2 {
<A>(n: 0, list: Array<A>): ReadonlyArray<never>
<A>(n: 1, list: Array<A>): ReadonlyArray<[A]> | ReadonlyArray<never>
<A>(n: 2, list: Array<A>): ReadonlyArray<[A, A]> | ReadonlyArray<never>
<A>(n: 3, list: Array<A>): ReadonlyArray<[A, A, A]> | ReadonlyArray<never>
<A>(n: 4, li... |
c341b58d1c014af2dbe1328aea76109e4c536fb4 | TypeScript | mvetois/MySQLDump | /src/functions.ts | 2.78125 | 3 | export const getDate = (date = new Date) : string => {
const year : string = String(date.getUTCFullYear());
const month : string = String(date.getUTCMonth());
const day : string = String(date.getUTCDay());
const hours : string = String(date.getUTCHours());
return (year + "_" + month + "_" + day + ... |
349ea7d2fcfaa3632a32292af4fd31018da29ee8 | TypeScript | enbock/Time-Tracker | /src/Language/Manager.test.ts | 2.765625 | 3 | import Loader from './Loader';
import Manager from './Manager';
import Translator, {LanguageData} from './Translator';
import Factory from './Translator/Factory';
describe('Language.Manager', () => {
let loaderSpy: jest.MockedFunction<(languageCode: string) => Promise<any>>,
createSpy: jest.MockedFunction<(langu... |
9764b64b9ffad8a7ec45601e62b26c9873dbe3db | TypeScript | Flaavius/basic-grpc-example | /src/client/client.ts | 2.65625 | 3 | import { createClient, createClientCreds } from "basic-grpc";
import { ILogin } from "../protos/login";
import { join } from "path";
((async () => {
const protoLoaderOptions = {
keepCase: true,
longs: String,
enums: String,
defaults: true,
oneofs: true
};
// accepts and array of Buffers or ... |
9d826559f86a88b089bd5659dbf1524f9f214fc6 | TypeScript | chrissc6/prs-client-solution | /src/app/system/ven-search.pipe.ts | 2.640625 | 3 | import { Pipe, PipeTransform } from '@angular/core';
import { Vendor } from '../vendor/vendor.class';
@Pipe({
name: 'venSearch'
})
export class VenSearchPipe implements PipeTransform {
transform(vendors: Vendor[], crit: string): Vendor[] {
if(crit == "")
{
return vendors;
}
let arrOut: Vend... |
abf0d4f9adccad64c0d654bb9960f8a38d41f052 | TypeScript | ThomasDupont/core | /packages/system/src/Stream/Stream/chunks.ts | 2.734375 | 3 | import * as A from "../../Collections/Immutable/Chunk"
import type { Stream } from "./definitions"
import { mapChunks_ } from "./mapChunks"
/**
* Exposes the underlying chunks of the stream as a stream of chunks of elements
*/
export function chunks<R, E, A>(self: Stream<R, E, A>): Stream<R, E, A.Chunk<A>> {
retur... |
e6d4a25ec3c3486df4f13cfc40c7b6a086fa155b | TypeScript | lluixhi/blog | /src/server/entities/User.ts | 2.84375 | 3 | import crypto from 'crypto';
import { Entity, Column, PrimaryColumn, OneToMany, OneToOne, BeforeInsert, BeforeUpdate, JoinColumn } from 'typeorm';
import { Post } from './Post';
import { Login } from './Login';
const salt: string = 'picklejuice';
@Entity()
export class User {
@PrimaryColumn()
username!: stri... |
3fdceb8e474e0b08393329f2c5d93022fe242a8b | TypeScript | dexpenses/dexpenses-extract | /src/extractor/date-time-matchers.ts | 2.5625 | 3 | import { DateTime } from 'luxon';
import { MatchersDef, statically } from '../utils/matcher/matcher-def';
function currentYear() {
return DateTime.local().setZone('Europe/Berlin').year;
}
export default {
d: { pattern: /(?:[l1-9]|[l12]\d|3[01l])/, replacements: [['l', 1]] },
dd: { pattern: /(?:0[l1-9]|[l12]\d|3... |
1245d02fa07879d7136aa427ad5f93f9b3ad5b9f | TypeScript | ArrowheadFramework/ahfc-configuration-rest-ws | /source/test/apes/TestWriterAnnotatedXML.ts | 2.890625 | 3 | import * as apes from "../../main/apes";
import * as unit from "../unit";
import * as utils from "./utils";
function writeAndCompare(f: (writer: apes.Writer) => void, expected: string) {
utils.writeAndCompare(sink =>
f(new apes.WriterAnnotatedXML(sink)), expected);
}
export const TestWriterAnnotatedXML: u... |
3021a12e554ec7f406ceb2552954cee2ae8e2228 | TypeScript | jasonaibrahim/thoughts | /spec/functions/SearchFunction.spec.ts | 2.625 | 3 | import {SearchFunction, SearchResult} from '../../lib/src/functions/SearchFunction';
import {CLIFunctionHelper} from '../../lib/src/functions/CLIFunctionHelper';
import * as fs from 'fs';
import * as path from 'path';
import * as rimraf from 'rimraf';
import minimist = require('minimist');
describe('SearchFunction', (... |
bc699726e901a5b6d0615f5dcd0a2606043d4337 | TypeScript | LabES-2021-Q3-AppJusto/admin | /src/common/components/form/input/pattern-input/formatters.ts | 2.953125 | 3 | export const cpfMask = '000.000.000-00';
export const cpfFormatter = (value: string = '') => {
return value.split('').reduce((result, digit, index) => {
if (index === 3 || index === 6) return `${result}.${digit}`;
if (index === 9) return `${result}-${digit}`;
return `${result}${digit}`;
}, '');
};
expo... |
ceed5c240b3b2dbffcabc1b4f1844914b0cce10f | TypeScript | daryl-cecile/AlphaDeck-Mock-Stock-Market-client | /public/scripts/XModal.ts | 2.859375 | 3 |
enum XModalType{
INFORMATION,
WARNING,
ALERT,
QUESTION
}
enum XModalButtonType{
PRIMARY,
DANGER,
CANCEL
}
interface XModalButtons {
[buttonIdentifier:string]:{
type: XModalButtonType,
text: string,
callback?: Function
};
}
class XModal extends HTMLElement{... |
78441d0381b2b7d7b7cb64b869cc8c2ca3050f45 | TypeScript | lotooo/terraforming-mars | /src/cards/ArtificialLake.ts | 2.671875 | 3 | import {IProjectCard} from './IProjectCard';
import {Tags} from './Tags';
import {CardType} from './CardType';
import {Player} from '../Player';
import {Game} from '../Game';
import {ISpace} from '../ISpace';
import {SelectSpace} from '../inputs/SelectSpace';
import {SpaceType} from '../SpaceType';
import * as constant... |
1fe276460afb8d2cc0e4dadc615eea2c0f95068f | TypeScript | gregbacchus/validata | /src/boolean.test.ts | 3.140625 | 3 | import { asBoolean, isBoolean, maybeAsBoolean, maybeBoolean } from './boolean';
import { expectIssue, expectSuccess, expectValue, runTests } from './test-helpers';
describe('isBoolean', () => {
it('incorrect type will cause an issue', () => {
const fut = isBoolean();
runTests(fut,
{ input: 'test', issu... |
8d3250d34584a9935fab535fb584af42dec5a77e | TypeScript | johanneslumpe/styled-props | /src/utils/fonts/fontVariant.ts | 2.75 | 3 | import { FontVariantProperty } from '@johanneslumpe/css-types';
import { style } from '../../style';
import { StyleOptions } from '../../types';
export interface FontVariantProps<T> {
/**
* The **font-variant** CSS property is a shorthand for the longhand properties `font-variant-caps`, `font-variant-numeric`, `... |
45d9d80d8a000c4d9e41f1146026a4004e915a80 | TypeScript | subspace/subspace-core | /src/experiments/consensus.ts | 2.609375 | 3 | // setup phase
// generate many random values (through hashing)
// add them to a binary search tree
// evaluation phase
// given a random challenge
// find all values within some minimum proximity (take the subtree)
|
c464148e0d5e388332ce8824a9c3c9cbb64f52df | TypeScript | zfs533/game_lobby | /test/assets/script/g-ebg/ebgAudio.ts | 2.53125 | 3 | //游戏相关音效
import Audio from "../g-share/audio"
const { ccclass, property } = cc._decorator
@ccclass
export default class EbgnAudio extends Audio {
//游戏背景
@property({ type: cc.AudioClip })
private bgm: cc.AudioClip = undefined
//游戏开始 提示
@property({ type: cc.AudioClip })
private StartGame: cc.A... |
61898c75e43f60237c78c1e0f5ef7915fbec8580 | TypeScript | robin-thomas/twitr | /assembly/model.ts | 2.515625 | 3 | // Exporting a new class Tweet so it can be used outside of this file.
export class Tweet {
id: i32;
sender: string;
text: string;
author: string;
created: string;
avatar: string;
img: string;
likes: i32;
likeHistory: Array<String>
retweets: i32;
retweetHistory: Array<String>
hasLiked: bool;
h... |
17158b0452871b3206b851735427dadfce528600 | TypeScript | shawbena/dom-scripting | /improved-gallery/index.ts | 2.5625 | 3 | import './index.css';
import { addLoadEvent } from '../lib';
function showPic(whichPic: HTMLAnchorElement): boolean {
let source = whichPic.getAttribute('href');
let placeholder = document.getElementById('placeholder');
let description = document.getElementById('description');
if(!placeholder){
... |
65df7e69302cbdbc2c83880965f5f050b708c1fe | TypeScript | Source-Research/async-validator | /__tests__/array.spec.ts | 2.890625 | 3 | import Schema from '../src';
describe('array', () => {
it('works for type', done => {
new Schema({
v: {
type: 'array',
},
}).validate(
{
v: '',
},
errors => {
expect(errors.length).toBe(1);
expect(errors[0].message).toBe('v is not an array');
... |
21ca1b9eb46956f650e7c973ca15052daae19115 | TypeScript | simpler-one/node.state-machine | /src/state-machine/type-wrapper/named-state-type.ts | 2.84375 | 3 | import { StateChangedEvent } from "../../event-args";
import { NamedState, OnEnterState, OnLeaveState, StateType } from "../../interface";
export class NamedType<S extends NamedState, A extends string, P>
implements StateType<S, A, P>, OnEnterState.Any, OnLeaveState.Any {
public get name(): string {
retu... |
e015ee1094d7d4bb7b14e8fdb484b061b63bf566 | TypeScript | carnesen/cli | /packages/cli/src/__tests__/c-cli-description.test.ts | 3.015625 | 3 | import {
CCliDescription,
renderCCliDescription,
RenderCCliDescriptionOptions,
} from '../c-cli-description';
import { cCliColorFactory } from '../c-cli-color-factory';
import { CCliColor } from '../c-cli-color';
const data: {
title: string;
description: CCliDescription;
text: string;
}[] = [
{
title: 'Return... |
2073afff62f1fafd8ba61af75d7d8538ffb6e727 | TypeScript | 0xGabi/connect | /packages/connect-core/src/utils/address.ts | 3.34375 | 3 | import { ethers } from 'ethers'
export const ANY_ENTITY = '0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF'
/**
* Checks if the given string is a checksummed address
*
* @method checkAddressChecksum
* @param {String} address the given HEX address
* @return {Boolean}
*/
function checkAddressChecksum(address: string):... |
3406b7e8b4319688f0d0c228123e7b7f04a57e59 | TypeScript | bizoru/angular-io-datepicker | /src/datepicker/selectors/minuteSelector.ts | 2.5625 | 3 | import { Component, EventEmitter, Input, Output } from "@angular/core";
import { Moment } from "moment";
import { AbstractSelector } from "./abstractSelector";
@Component({
selector: "minute-selector",
styles: [
`.date-set{line-height:2em;text-align:center;vertical-align:middle}.date-set.hidden{displ... |
3f760094b1a58b2e8eacef2492c691dd18da087a | TypeScript | StoneT2000/brain.js | /src/cross-validate.ts | 2.625 | 3 | import NeuralNetwork from './neural-network';
import {
INeuralNetworkBinaryTestResult,
INeuralNetworkOptions,
INeuralNetworkTestResult,
INeuralNetworkTrainingData,
INeuralNetworkTrainingOptions,
} from './neural-network-types';
export type ICrossValidateOptions = INeuralNetworkOptions;
export type ICrossVali... |
0d2478a9ef0f38c137869752a4126da9de800f5d | TypeScript | thatvineyard/songbook | /backend/src/database/entry.ts | 2.9375 | 3 | import { randomBytes } from 'crypto';
import { Id, IdGenerator } from './id';
export class Entry<T extends object> {
id: Id;
type: string;
revision: number;
created: Date;
lastModified: Date;
entryData: T | null;
constructor(entryData: T | null, idGenerator: IdGenerator) {
this.entryData = entryData... |
3b338aef7c282bc95976849680600f53093b3aa6 | TypeScript | HenryAlms/research-assistant | /src-outline/src/project-view.ts | 2.59375 | 3 | import {Source} from './source';
import {Model} from './model';
import {Observer} from './observer';
import {ProjectController as Controller} from './projectControl';
export class ProjectView implements Observer {
//HTML reference
protected docRef:NodeList = document.getElementsByTagName("input"); //on input,... |
d4c1d3b896373eda9a47c848a7b95157c47d45ed | TypeScript | NWZX/react-firebase-pagination-hooks | /src/util/usePaginationValue.ts | 2.84375 | 3 | import { firestore } from "firebase";
import * as React from "react";
import { addItem, deleteItem, updateItem } from "./operation";
const { useReducer } = React;
type ReducerState = {
hasMore: boolean;
value: firestore.QueryDocumentSnapshot[];
after: firestore.QueryDocumentSnapshot | null;
lastLoaded: firest... |
b2c32321c1aefc71a7b48a6f3b3d1753e532c581 | TypeScript | PatriciaCSouza/CRUD-Usuarios | /EF.AspNetCore.CrudUsuario/Views/Home/Index/src/app/utils/validations.util.ts | 3.109375 | 3 | export class Validator {
static IsValidEmail(email: string): boolean {
const EMAIL_REGEXP = /^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i;
if (email && (email.length <= 5 || !EMAIL_REGEXP.test(email))) {
return false;
}
... |
16ba31d562e2f4c59d9201b8f2256af68d62fe2f | TypeScript | DefinitelyTyped/DefinitelyTyped | /types/sort-json/index.d.ts | 3.125 | 3 | // Type definitions for sort-json 2.0
// Project: https://github.com/kesla/sort-json
// Definitions by: Florian Keller <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace visit {
interface VisitOptions {
/**
* Depth's level sorting ke... |
51d27f30fcb8b7c443edee612bcff16833ffb25b | TypeScript | qzx1991/x-reactive | /src/lib/Lazyable.ts | 2.90625 | 3 | /**是否是代理对象 */
export const LAZYABLE_FLAG = Symbol('_$$__$$__is_lazyable');
/**是否是一个已经proxy */
export const LAZYABLED_FLAG = Symbol('_$$__$$__is_lazyabled');
/** 代理对象的原生对象属性标识 */
export const ORIGIN_TARGET_FLAG = Symbol('_$$__$$__origin_target_flag');
export type LazyableGetHandlerType<T> = (
object: T,
key: st... |
9a4b7fe4597d97fdecf36bb99a7c471d6a00cb0f | TypeScript | NoworksM/koa-typescript-microservice-template | /src/middleware/user.ts | 2.53125 | 3 | import {Context, Next} from "koa";
import ITokenPayload from "../models/ITokenPayload";
import ErrorResponseViewModel from "../models/ErrorResponseViewModel";
import cache from "../cache/SiteMemoryCache";
async function userMiddleware(ctx: Context, next: Next): Promise<void> {
if (ctx.request.method === "OPTIONS")... |
2d9c7c89e65b77dfb7128432fc08e752c4279045 | TypeScript | dfeshed/nw-ueba-saas | /presidio-ui/presidio-ui-ui/app/app/shared/services/device-utils-service/device-utils-service.ts | 2.703125 | 3 | /**
*
*/
module Fortscale.shared.services.deviceUtilsService{
'use strict';
const OTHERS_NAME = 'Others';
import IActivityUserDevice = Fortscale.shared.services.entityActivityUtils.IActivityUserDevice;
import IActivityTopApplication = Fortscale.shared.services.entityActivityUtils.IActivityTopApplica... |
f5a33acb52aecbd3e2f64dd24e257ff0b379b800 | TypeScript | dinerojs/dinero.js | /packages/dinero.js/src/api/isNegative.ts | 2.9375 | 3 | import { isNegative as coreIsNegative } from '@dinero.js/core';
import type { IsNegativeParams } from '@dinero.js/core';
/**
* Check whether a Dinero object is negative.
*
* @param dineroObject - The Dinero object to check.
*
* @returns Whether the Dinero object is negative.
*
* @public
*/
export function isNe... |
7ae700f9cbb00f199b23c893979bf6e9d9239c0f | TypeScript | codingdojo-mean-03-19/gresamjeku | /05-angular/02-fetch-data/02_api/public/src/app/http.service.ts | 3.109375 | 3 | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class HttpService {
constructor(private _http: HttpClient){
this.getPokemon();
}
getPokemon(){
let tempObservable = this._http.get<ChlorophyllData>('https://poke... |
1b1c106a92dad4bf2d16ad988ef7398a0122eeb0 | TypeScript | simon-lammes/angular-app | /src/app/minesweeper/difficulty.ts | 3.109375 | 3 | export class Difficulty {
name: string;
rowCount: number;
columnCount: number;
bombCount: number;
get description(): string {
return `${this.name} ||| ${this.rowCount}X${this.columnCount} ||| ${this.bombCount} bombs`;
}
get cellCount(): number {
return this.rowCount * this.columnCount;
}
cons... |
91623bf9a1d4f21aded0077b047da9f898c6d2a7 | TypeScript | andrewhead/torii-store | /src/code/types/chunk.ts | 3.015625 | 3 | import { SimpleStore } from "../../common/types";
/**
* Order of chunks in "all" field is meaningless, as these chunks will be from many different files.
* Use the lineNumber and path properties of chunks if you want to sort them.
*/
export interface Chunks extends SimpleStore<ChunkId, Chunk> {}
export interface C... |
17521b085a2e89f855293fbf8e09a047d79a4de6 | TypeScript | NativeScript/NativeScript | /apps/automated/src/ui/label/label-tests-native.android.ts | 2.6875 | 3 | import * as labelModule from '@nativescript/core/ui/label';
import { CoreTypes } from '@nativescript/core';
import * as colorModule from '@nativescript/core/color';
export function getNativeTextAlignment(label: labelModule.Label): string {
let gravity = label.android.getGravity();
if ((gravity & android.view.Gravit... |