sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
7b786a823cad8cb91b6cf8d71cb1de6ac4edbb1dc91f6537d8971e59bef2db5c | Text | 29,482 | 387 | # Clonal analysis of the developing mouse gut using *in utero* lineage barcoding and scRNA-seq
Code repository for single-cell transcriptome and clonal relations analysis of the **mouse embryonic day 16.5 (E16.5) gut**, combined with **TREX lineage analysis** to dissect lineage relationships amongst diverse gut cell t... |
3fad928a55f37e45ad972e0b7dc7ce7a32da695c6725335089c6829363d42b14 | Text | 37,629 | 856 | # TAPA — Toolkit for Acoustic-Phonetic Analysis
A single recording can take a long time to transcribe and acoustically analyze. Researchers working with long-form audio, or without a team of annotators, face a bottleneck that funding restrictions continue to tighten. Production data is expensive to work with, and that ... |
3f6a351cc992b140a240a869207cadc49d5fcbb134212734b747269078d4d302 | Text | 191,484 | 6,916 | # katmap
> A library for interpreting splicing changes in terms of RBP binding.
KATMAP is a python library designed to learn interpretable models of splicing regulation from splicing factor (SF) perturbation RNA-seq experiments. Using the results of differential splicing analysis and information about SF's binding ... |
01fe161d6381a568747291bbd64e369438dae0dbaa46082332b26568f66bce1d | TypeScript | 35 | 1 | declare var global: NodeJS.Global;
|
2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1 | TypeScript | 55 | 1 | declare var global: NodeJS.Global & typeof globalThis;
|
46eb38b4f992126135e00159041a6e69e46402e56613bdc891d7b0d28fc31e37 | TypeScript | 77 | 2 | declare function fileUriToPath(uri: string): string;
export = fileUriToPath;
|
e2b66a06cc215d8f0dcb94d5940f95da40a828e46aa5249ee78e59ad1071727a | TypeScript | 78 | 4 | declare module "*.ico" {
const content: string;
export default content;
}
|
41492161be07794a3df8b9e526270916e3f6215d8a5de7f4f99088878bd99381 | TypeScript | 86 | 1 | export { default as OptionalMultiplexedSummary } from "./OptionalMultiplexedSummary";
|
3cddc44591c4415fb806ab7cc510c2377c60ef3a31a6d09db460fd42b4c6460d | TypeScript | 87 | 3 | declare const binaryExtensionsJson: readonly string[];
export = binaryExtensionsJson;
|
594108e052a71fbabf137a1139736186af6e437a255705e99f8c666f4d2af4c4 | TypeScript | 93 | 2 | declare function setPrototypeOf(o: any, proto: object | null): any;
export = setPrototypeOf;
|
c7bdc99177a2a94d25fb13722adaaf5b3291bf70b4d1b27584ba189dd3889ba3 | TypeScript | 93 | 4 | declare module 'assert/strict' {
import { strict } from 'assert';
export = strict;
}
|
53da490cb2cb7f9fa4228ca88eb3cdc46e0f4c2394cf5c1607ec00bf906aaf9f | TypeScript | 100 | 5 | declare module 'emoji-regex' {
function emojiRegex(): RegExp;
export default emojiRegex;
}
|
96da6c81cd788939a7cf6546ea1f65ab5ca38952e5bd7d8c284bfe1f3c22dce7 | TypeScript | 161 | 3 | export function byteLength(b64: string): number;
export function toByteArray(b64: string): Uint8Array;
export function fromByteArray(uint8: Uint8Array): string;
|
1da3b6a36b83b8b723f6fbf7bed731a79b60a735c31893ccef57cb5e68283b10 | TypeScript | 214 | 7 | /**
* Returns true if obj is a Buffer, an ArrayBuffer, a Blob or a File.
*
* @private
*/
export declare function isBinary(obj: any): boolean;
export declare function hasBinary(obj: any, toJSON?: boolean): any;
|
694689efa957c0ce6a486504150b441b958e0ecd08b0264ba6d74f1a386cf56e | TypeScript | 249 | 14 | /**
List of binary file extensions.
@example
```
import binaryExtensions = require('binary-extensions');
console.log(binaryExtensions);
//=> ['3ds', '3g2', …]
```
*/
declare const binaryExtensions: readonly string[];
export = binaryExtensions;
|
94ca7beec4e274d32362b54e0133152f7b4be9487db7b005070c03880b6363aa | TypeScript | 271 | 11 | declare module 'node:string_decoder' {
export * from 'string_decoder';
}
declare module 'string_decoder' {
class StringDecoder {
constructor(encoding?: BufferEncoding);
write(buffer: Buffer): string;
end(buffer?: Buffer): string;
}
}
|
573b0b1238e55bcf37c7d234495a99231ff8b71d09dc91816dc7709e56cb4aa4 | TypeScript | 289 | 13 | export enum TabTitle {
GEX = "Gene Expression",
VDJ_T = "VDJ-T",
VDJ_T_GD = "VDJ-T (G/D)",
VDJ_B = "VDJ-B",
AB = "Antibody",
AG = "Antigen",
CRISPR = "CRISPR",
CMO = "Multiplexing",
Hashtag = "Hashtag Multiplexing",
Custom = "Custom",
Annotate = "Cell Annotation",
}
|
d65a5fc8c0ec486e8227d3651241d91de8298420acbdadbfcac749c7633eb4f0 | TypeScript | 290 | 17 | /**
Check if a file path is a binary file.
@example
```
import isBinaryPath = require('is-binary-path');
isBinaryPath('source/unicorn.png');
//=> true
isBinaryPath('source/unicorn.txt');
//=> false
```
*/
declare function isBinaryPath(filePath: string): boolean;
export = isBinaryPath;
|
092cf35ca0f8f72a652d9a9e3dbdb892927de37a1704cd8d77e04ec1efbb148b | TypeScript | 294 | 7 | // NOTE: These definitions support NodeJS and TypeScript 3.5 - 3.6.
// This is required to enable typing assert in ts3.7 without causing errors
// Typically type modifications should be made in base.d.ts instead of here
/// <reference path="base.d.ts" />
/// <reference path="assert.d.ts" />
|
01d67b125ccace2a6159346a4894f7d0e1f270bd5a25ec0cb1326817c2ac7aa5 | TypeScript | 303 | 7 | // NOTE: These definitions support NodeJS and TypeScript 3.5 - 3.6.
// This is required to enable typing assert in ts3.7 without causing errors
// Typically type modifications should be made in base.d.ts instead of here
/// <reference path="base.d.ts" />
/// <reference path="../ts3.4/assert.d.ts" />
|
e43f6ff58ff67bf8694bcbd3272e292a43b5624fbe11882155d28273741d94b6 | TypeScript | 323 | 21 | declare namespace terminalSize {
interface Size {
columns: number;
rows: number;
}
}
/**
Reliably get the terminal window size.
@example
```
import terminalSize = require('term-size');
terminalSize();
//=> {columns: 143, rows: 24}
```
*/
declare function terminalSize(): terminalSize.Size;
export = terminalSiz... |
1eb4db5f83679b3b6f8683611c93938948aa2d5d5e3988755f9e3a289388b75e | TypeScript | 332 | 10 | declare namespace ieee754 {
export function read(
buffer: Uint8Array, offset: number, isLE: boolean, mLen: number,
nBytes: number): number;
export function write(
buffer: Uint8Array, value: number, offset: number, isLE: boolean,
mLen: number, nBytes: number): void;
}
expor... |
8b4abb0dd39d8eccd4425c117bd017e2c0bfafe1fd8143018a36dc3d1480720b | TypeScript | 335 | 11 | /**
* Each seciton can contain a lot of content.
* Cap them to a max height so that when the content gets
* really long a user will have to scroll inside each section,
* while also allowing them to see the overall contents of each
* section.
*/
export const SECTION_STYLE = {
maxHeight: 645,
overflowY: "scroll... |
aa907eac671382bb40ccad4bb8e9e33d48d3a7ecc264757b63da80e4cd1bbb14 | TypeScript | 345 | 22 | /**
Check if a value is an object.
Keep in mind that array, function, regexp, etc, are objects in JavaScript.
@example
```
import isObject = require('is-obj');
isObject({foo: 'bar'});
//=> true
isObject([1, 2, 3]);
//=> true
isObject('foo');
//=> false
```
*/
declare function isObject(value: unknown): value is obj... |
7a7ee35b8303adb02ee3718f938e58afefee66d0a1ddd37b89a920d968ffcd91 | TypeScript | 346 | 10 | /// <reference types="node" />
import { Socket } from 'net';
import { TLSSocket } from 'tls';
interface Listeners {
connect?: () => void;
secureConnect?: () => void;
close?: (hadError: boolean) => void;
}
declare const deferToConnect: (socket: Socket | TLSSocket, fn: Listeners | (() => void)) => void;
expor... |
d690ec58f57c5fa69cfe088959335c9f12482db67eb1bc1bbba93e3062f69276 | TypeScript | 349 | 15 | /**
Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string.
@example
```
import stripAnsi from 'strip-ansi';
stripAnsi('\u001B[4mUnicorn\u001B[0m');
//=> 'Unicorn'
stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
//=> 'Click'
```
*/
export default function stripA... |
a6ce02ea5fe2e197b7a939f8f2d5bd7608ca3989eeeb60bd3df88ee198d4595d | TypeScript | 351 | 16 | /**
Lowercase the keys of an object.
@returns A new object with the keys lowercased.
@example
```
import lowercaseKeys = require('lowercase-keys');
lowercaseKeys({FOO: true, bAr: false});
//=> {foo: true, bar: false}
```
*/
declare function lowercaseKeys<T extends unknown>(object: {[key: string]: T}): {[key: string]... |
4b0f7f88fc46a672cb59eeb2782af271c203600d602f57a717ef07f96092caf8 | TypeScript | 369 | 17 | /**
Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string.
@example
```
import stripAnsi = require('strip-ansi');
stripAnsi('\u001B[4mUnicorn\u001B[0m');
//=> 'Unicorn'
stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
//=> 'Click'
```
*/
declare function stripAn... |
6193e5e23f161047d18a158521a86c66fd5b8f6426678e1600adfb6195dff6b3 | TypeScript | 376 | 13 | import { Namespace } from "./namespace";
import type { Server } from "./index";
export declare class ParentNamespace extends Namespace {
private static count;
private children;
constructor(server: Server);
/**
* @private
*/
_initAdapter(): void;
emit(ev: string | Symbol, ...args: [...a... |
75c3544a7502e33145b1e0b93cb42037a41c82e76699a455b056af7f8f9bc69d | TypeScript | 379 | 19 | /**
Check if your package was installed globally.
@example
```
import isInstalledGlobally = require('is-installed-globally');
// With `npm install your-package`
console.log(isInstalledGlobally);
//=> false
// With `npm install --global your-package`
console.log(isInstalledGlobally);
//=> true
```
*/
declare const is... |
773a3e1723f63c863eb08ee3c7078ee09d8313cb1748d0fa599bd0d87ffceab9 | TypeScript | 388 | 16 | /**
Generate a unique random string.
@returns A 32 character unique string. Matches the length of MD5, which is [unique enough](https://stackoverflow.com/a/2444336/64949) for non-crypto purposes.
@example
```
import uniqueString = require('unique-string');
uniqueString();
//=> 'b4de2a49c8ffa3fbee04446f045483b2'
```
... |
50d22844db90a0dcd359afeb59dd1e9a384d977b4b363c880b4e65047237a29e | TypeScript | 415 | 22 | import {Except} from './except';
/**
Merge two types into a new type. Keys of the second type overrides keys of the first type.
@example
```
import {Merge} from 'type-fest';
type Foo = {
a: number;
b: string;
};
type Bar = {
b: number;
};
const ab: Merge<Foo, Bar> = {a: 1, b: 2};
```
*/
export type Merge<FirstT... |
69922c48a8f28317217455373eedaf7303772d0c2370cd9b553f091e71f7d47b | TypeScript | 427 | 23 | declare module 'emoji-regex' {
function emojiRegex(): RegExp;
export default emojiRegex;
}
declare module 'emoji-regex/text' {
function emojiRegex(): RegExp;
export default emojiRegex;
}
declare module 'emoji-regex/es2015' {
function emojiRegex(): RegExp;
export default emojiRegex;
}
decla... |
086a4b923b83ae4e7c4209512ac24c2d0493f3062181f606a05002300783945b | TypeScript | 429 | 8 | // NOTE: These definitions support NodeJS and TypeScript 3.2 - 3.4.
// This is required to enable globalThis support for global in ts3.5 without causing errors
// This is required to enable typing assert in ts3.7 without causing errors
// Typically type modifiations should be made in base.d.ts instead of here
/// <ref... |
cc05314d9cd00cd5801f0d56adaaced4da73d55e928788913ca03c08f57818b1 | TypeScript | 444 | 17 | /**
Generate a [cryptographically strong](https://en.m.wikipedia.org/wiki/Strong_cryptography) random string.
@param length - Length of the returned string.
@returns A [`hex`](https://en.wikipedia.org/wiki/Hexadecimal) string.
@example
```
import cryptoRandomString = require('crypto-random-string');
cryptoRandomStri... |
c7b79772e08ad4917a1a976fda51bd9fd639b4825d8e0b20012659af6bf05163 | TypeScript | 448 | 16 | declare const hasYarn: {
/**
* Check if a project is using [Yarn](https://yarnpkg.com).
*
* @param cwd - Current working directory. Default: `process.cwd()`.
* @returns Whether the project uses Yarn.
*/
(cwd?: string): boolean;
// TODO: Remove this for the next major release, refactor the whole definition... |
d0e0293c14513fb90dba47e86a382f607f0c012af64f6f687543e404a334dda6 | TypeScript | 490 | 21 | declare const widestLine: {
/**
Get the visual width of the widest line in a string - the number of columns required to display it.
@example
```
import widestLine = require('widest-line');
widestLine('古\n\u001B[1m@\u001B[22m');
//=> 2
```
*/
(input: string): number;
// TODO: remove this in the next major ... |
0af9e5579f5564d3c284e09bbc2357d7745fa184940e28264293bb19af3439a3 | TypeScript | 491 | 23 | export type MetricTableConfig = {
title: string;
help?: string;
entries: MetricEntryConfig[];
orderBy?: string[];
};
export type MetricEntryConfig = {
key: string;
help: string | ConditionalMetricHelp[];
category?: "Library" | "Cells";
};
/**
* Define conditional help text for a metric.
*
* The help ... |
8b4f4519834b57645d2483af74d6f5d1675260a5b0e9aa6026f3e021edd2c5e9 | TypeScript | 504 | 17 | declare module 'node:timers/promises' {
export * from 'timers/promises';
}
declare module 'timers/promises' {
import { TimerOptions } from 'node:timers';
/**
* Returns a promise that resolves after the specified delay in milliseconds.
*/
function setTimeout<T>(delay: number, value?: T, optio... |
7054578d88c2cf4daa4f57097bb304927aa632d638801acc54ca3ed672ce1fdf | TypeScript | 525 | 17 | import {IncomingMessage} from 'http';
/**
Mimic a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage)
Makes `toStream` include the properties from `fromStream`.
@param fromStream - The stream to copy the properties from.
@param toStream - The stream to copy the properties... |
9a3e6bdffd8335b7d29c1d578ef7411703c57d07aff959bda92b27110f868532 | TypeScript | 549 | 17 | /**
Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms).
@param codePoint - The [code point](https://en.wikipedia.org/wiki/Code_point) of a character.
@example
```
import isFullwidthCod... |
299d47ed52d5fe5b69c76269e3152361f0f5b125f847012e9af57f7021a5de91 | TypeScript | 556 | 18 | import type { WellData } from "../../../shared/websummary/components/CellRanger/Plate";
import { MetricTableConfig } from "../config/types";
import {
ExperimentalDesign,
LibraryType,
MultiWebSummarySampleData,
} from "../types";
export interface MultiSampleTabContentsProps {
configs: MetricTableConfig[];
exp... |
4fb0b7d532aa6fb850b6cd2f1ee4f00802d877b5c66a51903bc1fb0624126349 | TypeScript | 660 | 19 | type AnymatchFn = (testString: string) => boolean;
type AnymatchPattern = string|RegExp|AnymatchFn;
type AnymatchMatcher = AnymatchPattern|AnymatchPattern[]
type AnymatchTester = {
(testString: string|any[], returnIndex: true): number;
(testString: string|any[]): boolean;
}
type PicomatchOptions = {dot: boolean};
... |
f233d56f423b86ffc2039c61ca75a3a6a8aa3a943cf1ff29cc160486185ecb9c | TypeScript | 673 | 20 | /**
* Replaces every Buffer | ArrayBuffer | Blob | File in packet with a numbered placeholder.
*
* @param {Object} packet - socket.io event packet
* @return {Object} with deconstructed packet and list of buffers
* @public
*/
export declare function deconstructPacket(packet: any): {
packet: any;
buffers: a... |
1f2e0d7173b86a8a84c9a6acd319b89d48e1411b5024e6eb03dc1551b30f392d | TypeScript | 684 | 39 | /**
Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag.
@param flag - CLI flag to look for. The `--` prefix is optional.
@param argv - CLI arguments. Default: `process.argv`.
@returns Whether the flag exists.
@example
```
// $ ts-node foo.ts -f --unicorn --foo=... |
946cc1b742217c2770427a7abcb1147c664aa939a77822ff9036533f6d9e8ee8 | TypeScript | 686 | 14 | import { Namespace } from "./namespace";
import type { Server } from "./index";
import type { EventParams, EventNames, EventsMap, DefaultEventsMap } from "./typed-events";
export declare class ParentNamespace<ListenEvents extends EventsMap = DefaultEventsMap, EmitEvents extends EventsMap = ListenEvents> extends Namespa... |
0e9c55f894ca2d9cf63b5b0d43a8cec1772dd560233fd16275bc7a485eb82f83 | TypeScript | 698 | 19 | /** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
declare module 'node:constants' {
import exp = require('constants');
export = exp;
}
/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
declare module 'constants' {
... |
a3a88c1869ba1022dfaefac47ff7a984ec62510e9b4d60988f91d5e523266c34 | TypeScript | 703 | 22 | // Type definitions for component-emitter v1.2.1
// Project: https://www.npmjs.com/package/component-emitter
// Definitions by: Peter Snider <https://github.com/psnider>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
interface Emitter<Event = string> {
on(event: Even... |
a902326b04490db2b99a85e58e0acb14a437ca7e2231e9adfb2fa91acdcc365c | TypeScript | 744 | 37 | declare namespace ansiRegex {
interface Options {
/**
Match only the first ANSI escape.
@default false
*/
onlyFirst: boolean;
}
}
/**
Regular expression for matching ANSI escape codes.
@example
```
import ansiRegex = require('ansi-regex');
ansiRegex().test('\u001B[4mcake\u001B[0m');
//=> true
ansiRegex... |
01d8eb04ffbf5e877a8e2ca12ab2775bf1bc85e9e405859c148e2eaf1ca11337 | TypeScript | 746 | 32 | /**
Simple micro templating.
@param template - Text with placeholders for `data` properties.
@param data - Data to interpolate into `template`.
@example
```
import pupa = require('pupa');
pupa('The mobile number of {name} is {phone.mobile}', {
name: 'Sindre',
phone: {
mobile: '609 24 363'
}
});
//=> 'The mobile... |
b0d361d5203bc25f62d66e00058a6d80390beb4f53008e15ce385e57ed5f406e | TypeScript | 758 | 27 | /**
Check if a path is inside another path.
Note that relative paths are resolved against `process.cwd()` to make them absolute.
_Important:_ This package is meant for use with path manipulation. It does not check if the paths exist nor does it resolve symlinks. You should not use this as a security mechanism to guar... |
5726b5ce952dc5beaeb08d5f64236632501568a54a390363d2339ba1dc5393b1 | TypeScript | 770 | 26 | declare module 'node:buffer' {
export * from 'buffer';
}
declare module 'buffer' {
export const INSPECT_MAX_BYTES: number;
export const kMaxLength: number;
export const kStringMaxLength: number;
export const constants: {
MAX_LENGTH: number;
MAX_STRING_LENGTH: number;
};
cons... |
537aff717746703d2157ec563b5de4f6393ce9f69a84ae62b49e9b6c80b6e587 | TypeScript | 775 | 23 | /**
Create a type that represents either the value or the value wrapped in `PromiseLike`.
Use-cases:
- A function accepts a callback that may either return a value synchronously or may return a promised value.
- This type could be the return type of `Promise#then()`, `Promise#catch()`, and `Promise#finally()` callback... |
04c593214be9083f51ed93751bd556bfdc0737b0a4cdaf225b12a525df7fa0dc | TypeScript | 777 | 20 | // Basic
export * from './source/basic';
// Utilities
export {Except} from './source/except';
export {Mutable} from './source/mutable';
export {Merge} from './source/merge';
export {MergeExclusive} from './source/merge-exclusive';
export {RequireAtLeastOne} from './source/require-at-least-one';
export {RequireExactlyO... |
32b0ba649390a574b682269f47e6a8d9e69d84c8b18fbafa19665d22ab691119 | TypeScript | 780 | 41 | /**
Check if your code is running as an [npm](https://docs.npmjs.com/misc/scripts) or [yarn](https://yarnpkg.com/lang/en/docs/cli/run/) script.
@example
```
import {isNpmOrYarn} from 'is-npm';
if (isNpmOrYarn) {
console.log('Running as an npm or yarn script!');
}
```
*/
export const isNpmOrYarn: boolean;
/**
Check ... |
06d2be99c3dd2ff52114d02ee443ba486ab482423df1941d3c97d6a92e924d70 | TypeScript | 784 | 28 | declare module 'node:domain' {
export * from 'domain';
}
declare module 'domain' {
import EventEmitter = require('node:events');
global {
namespace NodeJS {
interface Domain extends EventEmitter {
run<T>(fn: (...args: any[]) => T, ...args: any[]): T;
add... |
08f234e8871dacf59e1f194fd83c11d002d8d4d488f7be138900755e3e637a24 | TypeScript | 792 | 29 | declare const stringWidth: {
/**
Get the visual width of a string - the number of columns required to display it.
Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) ... |
75e0e9ccb1233b2897aada4bf477a030e247bf2ccaf4b978ed42db225ac8edcc | TypeScript | 799 | 29 | /// <reference types="node"/>
import {IncomingMessage} from 'http';
declare const decompressResponse: {
/**
Decompress a HTTP response if needed.
@param response - The HTTP incoming stream with compressed data.
@returns The decompressed HTTP response stream.
@example
```
import {http} from 'http';
import dec... |
7f7f1420c69806e268ab7820cbe31a2dcb2f836f28b3d09132a2a95b4a454b80 | TypeScript | 809 | 32 | import {Except} from './except';
/**
Create a type that requires at least one of the given keys. The remaining keys are kept as is.
@example
```
import {RequireAtLeastOne} from 'type-fest';
type Responder = {
text?: () => string;
json?: () => string;
secure?: boolean;
};
const responder: RequireAtLeastOne<Respo... |
91f23ddc3971b1c8938c638fb55601a339483953e1eb800675fa5b5e8113db72 | TypeScript | 860 | 22 | /**
Convert an object with `readonly` keys into a mutable object. Inverse of `Readonly<T>`.
This can be used to [store and mutate options within a class](https://github.com/sindresorhus/pageres/blob/4a5d05fca19a5fbd2f53842cbf3eb7b1b63bddd2/source/index.ts#L72), [edit `readonly` objects within tests](https://stackoverf... |
c58be3e560989a877531d3ff7c9e5db41c5dd9282480ccf197abfcc708a95b8d | TypeScript | 886 | 22 | /**
Create a type from an object type without certain keys.
This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The... |
2d713cbcbd5bcc38d91546eaeea7bb1c8686dc4a2995a28556d957b1b9de11d9 | TypeScript | 890 | 20 | declare module 'node:timers' {
export * from 'timers';
}
declare module 'timers' {
function setTimeout(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
namespace setTimeout {
function __promisify__(ms: number): Promise<void>;
function __promisify__<T>(ms: nu... |
e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b | TypeScript | 905 | 19 | // NOTE: These definitions support NodeJS and TypeScript 3.7.
// NOTE: TypeScript version-specific augmentations can be found in the following paths:
// - ~/base.d.ts - Shared definitions common to all TypeScript versions
// - ~/index.d.ts - Definitions specific to TypeScript 2.1
// ... |
0fe853aa9e538f751b1aa72585585bdea648b467d2ecea247ad449d667573523 | TypeScript | 949 | 33 | declare const registryUrl: {
/**
Get the set npm registry URL.
@param scope - Retrieve the registry URL associated with an [npm scope](https://docs.npmjs.com/misc/scope). If the provided scope is not in the user's `.npmrc` file, then `registry-url` will check for the existence of `registry`, or if that's not set, f... |
1d770f0737712093455a443bc527a43bc7e232a88b4aa75efed8c7ae140c22a4 | TypeScript | 981 | 42 | declare namespace latestVersion {
interface Options {
/**
A semver range or [dist-tag](https://docs.npmjs.com/cli/dist-tag).
*/
readonly version?: string;
}
}
declare const latestVersion: {
/**
Get the latest version of an npm package.
@example
```
import latestVersion = require('latest-version');
(a... |
73aaee6a7a9cf41fb2c67158f4bc218f9da27545ea55648b2c10ca2a9600ae15 | TypeScript | 982 | 24 | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
* REQUIREMENT: This definition is dependent on the @types/node definition.
* Install with `npm install @types/node --save-... |
ad1ae5ae98eceb9af99061e83e867b9897d267aebc8f3b938c9424deabadf4bb | TypeScript | 1,000 | 22 | // NOTE: These definitions support NodeJS and TypeScript 3.5.
// NOTE: TypeScript version-specific augmentations can be found in the following paths:
// - ~/base.d.ts - Shared definitions common to all TypeScript versions
// - ~/index.d.ts - Definitions specific to TypeScript 2.1
// ... |
787c8ef8bf581ddca57ba7316d31dbfeb0695b39de2c17a89bac6a23343e6477 | TypeScript | 1,002 | 36 | import { useMemo, useState } from "react";
import { JsonMetricSummary } from "../types";
import { sortMultiRowMetrics } from "./utils";
type SortDirection = "asc" | "desc";
/**
* Manages MetricsTable sorting.
*/
export function useRowSort(
tableRows: JsonMetricSummary[][],
initialSortOrder: string[],
) {
con... |
25cc2353fb94588bbf6c1393006ff4155ce567dd60abceafc2940f99e43e3519 | TypeScript | 1,018 | 43 | // TypeScript Version: 3.2
/// <reference types="node" lib="esnext" />
import * as fs from 'fs';
import { Readable } from 'stream';
declare namespace readdir {
interface EntryInfo {
path: string;
fullPath: string;
basename: string;
stats?: fs.Stats;
dirent?: fs.Dirent;
}
interface Readdirp... |
5d007514c3876ecc7326b898d1738eed7b77d6a3611d73f5c99fe37801dd48e6 | TypeScript | 1,057 | 32 | /**
Create a type that makes the given keys optional. The remaining keys are kept as is. The sister of the `SetRequired` type.
Use-case: You want to define a single model where the only thing that changes is whether or not some of the keys are optional.
@example
```
import {SetOptional} from 'type-fest';
type Foo = ... |
85dff77bf599bd57135b34169d8f80914bbcdb52dfa9fb5fa2204b366363d519 | TypeScript | 1,058 | 32 | /**
Create a type that makes the given keys required. The remaining keys are kept as is. The sister of the `SetOptional` type.
Use-case: You want to define a single model where the only thing that changes is whether or not some of the keys are required.
@example
```
import {SetRequired} from 'type-fest';
type Foo = ... |
af68c17117dab4cc9387499e195148aaab08c014372b9477480fa1c3d82bf316 | TypeScript | 1,082 | 58 | declare namespace semverDiff {
type Result =
| 'major'
| 'premajor'
| 'minor'
| 'preminor'
| 'patch'
| 'prepatch'
| 'prerelease'
| 'build';
}
/**
Get the diff type of two [semver](https://github.com/npm/node-semver) versions: `0.0.1 0.0.2` → `patch`.
@returns The difference type between two semver ve... |
f4a3fc4efc6944e7b7bd4ccfa45e0df68b6359808e6cf9d061f04fd964a7b2d3 | TypeScript | 1,118 | 32 | declare module 'node:querystring' {
export * from 'querystring';
}
declare module 'querystring' {
interface StringifyOptions {
encodeURIComponent?: (str: string) => string;
}
interface ParseOptions {
maxKeys?: number;
decodeURIComponent?: (str: string) => string;
}
int... |
091af8276fbc70609a00e296840bd284a2fe29df282f0e8dae2de9f0a706685f | TypeScript | 1,152 | 33 | import {Primitive} from './basic';
/**
Allows creating a union type by combining primitive types and literal types without sacrificing auto-completion in IDEs for the literal type part of the union.
Currently, when a union type of a primitive type is combined with literal types, TypeScript loses all information about... |
b8e7261f41dd775524077306a69c01796bd5a2a742c7338e6607ff4e689bc356 | TypeScript | 1,280 | 63 | declare namespace camelcase {
interface Options {
/**
Uppercase the first character: `foo-bar` → `FooBar`.
@default false
*/
readonly pascalCase?: boolean;
}
}
declare const camelcase: {
/**
Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`.
@param i... |
c066d3e24706d1477a8415ceb0464a1aebed81b5523b2b87927be7ae57111d1f | TypeScript | 1,287 | 60 | declare namespace globalDirectories {
interface GlobalDirectories {
/**
Directory with globally installed packages.
Equivalent to `npm root --global`.
*/
readonly packages: string;
/**
Directory with globally installed binaries.
Equivalent to `npm bin --global`.
*/
readonly binaries: string;
... |
f9ecf72f3842ae35faf3aa122a9c87a486446cb9084601695f9e6a2cdf0d3e4b | TypeScript | 1,322 | 36 | // TODO: Remove this when we target TypeScript >=3.5.
// eslint-disable-next-line @typescript-eslint/generic-type-naming
type _Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
/**
Create a type that requires exactly one of the given keys and disallows more. The remaining keys are kept as is.
Use-cases:
- ... |
911175d5a29fce5f6f471bcab94524474a1f99eec9cb86fe96505a40ce75f972 | TypeScript | 1,328 | 34 | declare module 'node:timers' {
export * from 'timers';
}
declare module 'timers' {
interface TimerOptions {
/**
* Set to `false` to indicate that the scheduled `Timeout`
* should not require the Node.js event loop to remain active.
* @default true
*/
ref?: bo... |
d33782b82eea0ee17b99ca563bd19b38259a3aaf096d306ceaf59cd4422629be | TypeScript | 1,340 | 39 | // Helper type. Not useful on its own.
type Without<FirstType, SecondType> = {[KeyType in Exclude<keyof FirstType, keyof SecondType>]?: never};
/**
Create a type that has mutually exclusive keys.
This type was inspired by [this comment](https://github.com/Microsoft/TypeScript/issues/14094#issuecomment-373782604).
Th... |
5919f47b104f7994b731cd3a5984f952caad8a5b240292b6d1ff09adf16c7fb6 | TypeScript | 1,347 | 55 | import {
WELL_COLUMNS,
WELL_ROWS,
WellColumn,
WellData,
WellRow,
} from "../../../../shared/websummary/components/CellRanger/Plate";
import { ExperimentalDesign, SampleWebSummary } from "../../types";
export function defaultPlateData() {
const unusedWellColor = "#FFFFFF";
const colors = {} as WellData;
... |
5a0c23174f822edd4a0c5f52308fd6cbdfcc5ef9c4279286cf7da548fd46cb1b | TypeScript | 1,383 | 40 | /**
Create an opaque type, which hides its internal details from the public, and can only be created by being used explicitly.
The generic type parameter can be anything. It doesn't have to be an object.
[Read more about opaque types.](https://codemix.com/opaque-types-in-javascript/)
There have been several discussi... |
8af9d2560a8892797bec6d6eb6b250576f886b823c27a63fcb6d2e4257f6419f | TypeScript | 1,462 | 51 | import { describe, expect, test } from "@jest/globals";
import MultiplexLibraryConfig from "./multiplex-library";
import MultiplexSampleConfig from "./multiplex-sample";
import { SinglePlexConfig } from "./singleplex";
import { MetricTableConfig } from "./types";
describe("CellRanger", () => {
describe("OptionalMul... |
08c19f0b735146ea0387e29083bcd6416fd64d97fc12e68867cda678d41a6f60 | TypeScript | 1,534 | 66 | /// <reference types="node"/>
import * as fs from 'fs';
declare namespace makeDir {
interface Options {
/**
Directory [permissions](https://x-team.com/blog/file-system-permissions-umask-node-js/).
@default 0o777
*/
readonly mode?: number;
/**
Use a custom `fs` implementation. For example [`graceful-fs... |
34739077a773aee172bdace5082c5411e2089b62e586cd097ea55362f1a3b1de | TypeScript | 1,545 | 113 | declare namespace cliBoxes {
/**
Style of the box border.
*/
interface BoxStyle {
readonly topLeft: string;
readonly topRight: string;
readonly bottomLeft: string;
readonly bottomRight: string;
readonly horizontal: string;
readonly vertical: string;
}
/**
All box styles.
*/
interface Boxes {
/**... |
6ce9c4c7d976960a7f14dfe40e26c357bcab9405eb2eea38f79760ed4f323512 | TypeScript | 1,556 | 72 | import Emitter = require("component-emitter");
/**
* Protocol version.
*
* @public
*/
export declare const protocol: number;
export declare enum PacketType {
CONNECT = 0,
DISCONNECT = 1,
EVENT = 2,
ACK = 3,
CONNECT_ERROR = 4,
BINARY_EVENT = 5,
BINARY_ACK = 6
}
export interface Packet {
... |
d0c3d74b53f092d91d5a5bd160ed18094fcc84049a4b61841a5344aec3c11bd2 | TypeScript | 1,566 | 81 | declare const xdgBasedir: {
/**
Directory for user-specific data files.
@example
```js
import xdgBasedir = require('xdg-basedir');
xdgBasedir.data;
//=> '/home/sindresorhus/.local/share'
```
*/
readonly data?: string;
/**
Directory for user-specific configuration files.
@example
```js
import xdgBased... |
e358a8c1d2a441bfcafe78fd58501ad3d456996943c04127fbc76c368e627547 | TypeScript | 1,663 | 43 | import React from "react";
import { createRoot } from "react-dom/client";
import { MultiWebSummary } from "src/components/OptionalMultiplexedSummary/types";
import { OptionalMultiplexedSummary } from "./src/components/index";
import favicon from "./src/shared/websummary/assets/favicon.ico";
import expandSummary from "... |
a68969f643e0cb091046a9437b64cb1880a081fc07c70a4717b0edef2a38bc85 | TypeScript | 1,696 | 58 | // Type definitions for cors 2.8
// Project: https://github.com/expressjs/cors/
// Definitions by: Alan Plum <https://github.com/pluma>
// Gaurav Sharma <https://github.com/gtpan77>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import { IncomingHttpHeader... |
38ee3fef21f0405bca33a75daedf35372e31772ca7a61f08d96f9448fea9fa23 | TypeScript | 1,700 | 57 | import { describe, expect, test } from "@jest/globals";
import { makeMetric } from "../test-utils";
import {
cleanTableStructure,
placeholderMetric,
processMultiRowMetrics,
} from "./utils";
describe("OptionalMultiplexedSummary", () => {
describe("MetricsTable", () => {
describe("utils", () => {
tes... |
1978992206803f5761e99e893d93b25abc818c5fe619674fdf2ae02b29f641ba | TypeScript | 1,721 | 40 | declare module 'node:https' {
export * from 'https';
}
declare module 'https' {
import * as tls from 'node:tls';
import * as http from 'node:http';
import { URL } from 'node:url';
type ServerOptions = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions;
type RequestOptions = http.R... |
3bcc26119b56f23b4cc5fe82897a359d40aa414d3901a613833adedbc4ada12e | TypeScript | 1,738 | 62 | /**
Escape a string for use in HTML.
Escapes the following characters in the given `string` argument: `&` `<` `>` `"` `'`.
@example
```
import {htmlEscape} from 'escape-goat';
htmlEscape('🦄 & 🐐');
//=> '🦄 & 🐐'
htmlEscape('Hello <em>World</em>');
//=> 'Hello <em>World</em>'
```
*/
export function... |
8e7d6dae9e19bbe47600dcfd4418db85b30ae7351474ea0aad5e628f9845d340 | TypeScript | 1,742 | 57 | declare module 'node:module' {
import Module = require('module');
export = Module;
}
declare module 'module' {
import { URL } from 'node:url';
namespace Module {
/**
* Updates all the live bindings for builtin ES Modules to match the properties of the CommonJS exports.
* It do... |
f4e7f5824ac7b35539efc3bef36b3e6be89603b88224cb5c0ad3526a454fc895 | TypeScript | 1,828 | 59 | import {Primitive} from './basic';
/**
Convert `object`s, `Map`s, `Set`s, and `Array`s and all of their keys/elements into immutable structures recursively.
This is useful when a deeply nested structure needs to be exposed as completely immutable, for example, an imported JSON module or when receiving an API response... |
da2bfd505887b55873d3f75040fd347e782bddb471a3a9e3e77650fd56741f75 | TypeScript | 1,854 | 57 | import { describe, expect, test } from "@jest/globals";
import { contentForLibraryType } from "./utils";
describe("OptionalMultiplexedSummary", () => {
describe("SampleRollup", () => {
describe("utils", () => {
describe("contentForLibraryType", () => {
test("returns the correct content for each su... |
8eab1276a7a989de5ae4b3e73f71cedc4c8869067db17058001c97697bf39e9e | TypeScript | 1,909 | 53 | import { describe, expect, test } from "@jest/globals";
import { makeAlert } from "./test-utils";
import {
getAlertSeverityFromAlerts,
getMostSevereAlertTitlesFromAlerts,
} from "./utils";
describe("OptionalMultiplexedSummary", () => {
describe("utils", () => {
describe("getMostSevereAlertFromAlerts", () =>... |
a25090fc97cc94639a8d8667d69fa7d60a689b83779afb76f7095265cc21e869 | TypeScript | 1,977 | 100 | import {
AlertConfig,
AlertLevel,
ExperimentalDesign,
JsonMetricSummary,
MetricConfig,
SampleWebSummary,
} from "./types";
// Helper function to create metric summaries for testing
export function makeMetric(
key: string,
grouping_key: number,
value: string | number | { numerator: number; denominator... |
fda9e5c2afd0920ead6baed40f164229ec8f93188b5c8df196594a54bb8fb5e3 | TypeScript | 2,017 | 67 | /// <reference lib="esnext"/>
// TODO: This can just be `export type Primitive = not object` when the `not` keyword is out.
/**
Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
*/
export type Primitive =
| null
| undefined
| string
| number
| boolean
| symbol
| bigint;... |
bf1dfc777e80cc94eb92c5a505c7a3625645f344d9ca0db695e9c2378fc5624c | TypeScript | 2,022 | 73 | import {
JsonMetricSummary,
LibraryType,
MultiWebSummarySampleData,
TabContent,
} from "../../types";
/**
* Equivalent to a 'zip' over {barcodes|metrics}PerSample so we don't have to
* rely on 'vectors of scalars' downstream.
*/
export function groupMetricsWithBarcodes(
sampleIds: string[],
barcodesPerS... |
0b7733d83619ac4e3963e2a9f7c75dc1e9af6850cb2354c9554977813092c10a | TypeScript | 2,187 | 65 | declare module 'node:trace_events' {
export * from 'trace_events';
}
declare module 'trace_events' {
/**
* The `Tracing` object is used to enable or disable tracing for sets of
* categories. Instances are created using the
* `trace_events.createTracing()` method.
*
* When created, the ... |
8658a5f9a04b5b14b8d264a6b5c6e15b64549bf1fc89fff9783fdafc5a65633e | TypeScript | 2,188 | 87 | import kebabCase from "lodash/kebabCase";
import { ALERT_LEVEL } from "../../shared/websummary/components/consts";
import { AlertLevel, AlertSpec } from "./types";
/**
* Find the most severe alert type from a collection of things that may contain
* alerts.
*
* Provide the collection, as well as the function to un... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.