mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Deprecate types for packages that provide their own types (#33755)
* Remove upstreamed types * Remove more packages
This commit is contained in:
committed by
Wesley Wigham
parent
3eb866bd83
commit
b1a104ea4f
@@ -198,6 +198,12 @@
|
||||
"sourceRepoURL": "https://github.com/ded/bowser",
|
||||
"asOfVersion": "1.1.1"
|
||||
},
|
||||
{
|
||||
"libraryName": "boxen",
|
||||
"typingsPackageName": "boxen",
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/boxen",
|
||||
"asOfVersion": "3.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "Bugsnag Browser",
|
||||
"typingsPackageName": "bugsnag-js",
|
||||
@@ -294,6 +300,12 @@
|
||||
"sourceRepoURL": "https://github.com/blakeembrey/constant-case",
|
||||
"asOfVersion": "1.1.2"
|
||||
},
|
||||
{
|
||||
"libraryName": "copy-text-to-clipboard",
|
||||
"typingsPackageName": "copy-text-to-clipboard",
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/copy-text-to-clipboard",
|
||||
"asOfVersion": "2.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "cordova-plugin-battery-status",
|
||||
"typingsPackageName": "cordova-plugin-battery-status",
|
||||
@@ -408,6 +420,18 @@
|
||||
"sourceRepoURL": "https://github.com/jayphelps/core-decorators.js",
|
||||
"asOfVersion": "0.20.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "cp-file",
|
||||
"typingsPackageName": "cp-file",
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/cp-file",
|
||||
"asOfVersion": "6.1.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "cpy",
|
||||
"typingsPackageName": "cpy",
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/cpy",
|
||||
"asOfVersion": "7.1.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "cypress",
|
||||
"typingsPackageName": "cypress",
|
||||
@@ -426,6 +450,12 @@
|
||||
"sourceRepoURL": "https://github.com/DataDog/dd-trace-js",
|
||||
"asOfVersion": "0.9.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "decamelize",
|
||||
"typingsPackageName": "decamelize",
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/decamelize",
|
||||
"asOfVersion": "3.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "decimal.js",
|
||||
"typingsPackageName": "decimal.js",
|
||||
@@ -642,6 +672,12 @@
|
||||
"sourceRepoURL": "https://github.com/taylorhakes/fecha",
|
||||
"asOfVersion": "2.3.1"
|
||||
},
|
||||
{
|
||||
"libraryName": "file-type",
|
||||
"typingsPackageName": "file-type",
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/file-type",
|
||||
"asOfVersion": "10.9.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "FineUploader",
|
||||
"typingsPackageName": "fine-uploader",
|
||||
@@ -786,6 +822,12 @@
|
||||
"sourceRepoURL": "https://github.com/prettymuchbryce/node-http-status",
|
||||
"asOfVersion": "1.2.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "humanize-string",
|
||||
"typingsPackageName": "humanize-string",
|
||||
"sourceRepoURL": "ttps://github.com/sindresorhus/humanize-string",
|
||||
"asOfVersion": "2.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "i18next-browser-languagedetector",
|
||||
"typingsPackageName": "i18next-browser-languagedetector",
|
||||
@@ -810,6 +852,12 @@
|
||||
"sourceRepoURL": "https://github.com/bpmn-io/ids",
|
||||
"asOfVersion": "0.2.2"
|
||||
},
|
||||
{
|
||||
"libraryName": "image-type",
|
||||
"typingsPackageName": "image-type",
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/image-type",
|
||||
"asOfVersion": "4.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "immutability-helper",
|
||||
"typingsPackageName": "immutability-helper",
|
||||
@@ -894,6 +942,12 @@
|
||||
"sourceRepoURL": "https://github.com/jonschlinkert/is-plain-object",
|
||||
"asOfVersion": "2.0.4"
|
||||
},
|
||||
{
|
||||
"libraryName": "is-svg",
|
||||
"typingsPackageName": "is-svg",
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/is-svg",
|
||||
"asOfVersion": "4.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "is-upper-case",
|
||||
"typingsPackageName": "is-upper-case",
|
||||
@@ -1200,6 +1254,18 @@
|
||||
"sourceRepoURL": "https://github.com/paularmstrong/normalizr",
|
||||
"asOfVersion": "2.0.18"
|
||||
},
|
||||
{
|
||||
"libraryName": "npm-name",
|
||||
"typingsPackageName": "npm-name",
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/npm-name",
|
||||
"asOfVersion": "5.2.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "npm-run-path",
|
||||
"typingsPackageName": "npm-run-path",
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/npm-run-path",
|
||||
"asOfVersion": "3.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "Nuka Carousel",
|
||||
"typingsPackageName": "nuka-carousel",
|
||||
@@ -1260,6 +1326,12 @@
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/p-queue",
|
||||
"asOfVersion": "3.2.1"
|
||||
},
|
||||
{
|
||||
"libraryName": "p-some",
|
||||
"typingsPackageName": "p-some",
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/p-some",
|
||||
"asOfVersion": "4.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "p-throttle",
|
||||
"typingsPackageName": "p-throttle",
|
||||
@@ -1290,6 +1362,12 @@
|
||||
"sourceRepoURL": "https://github.com/blakeembrey/path-case",
|
||||
"asOfVersion": "1.1.2"
|
||||
},
|
||||
{
|
||||
"libraryName": "path-key",
|
||||
"typingsPackageName": "path-key",
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/path-key",
|
||||
"asOfVersion": "3.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "path-to-regexp",
|
||||
"typingsPackageName": "path-to-regexp",
|
||||
@@ -1380,6 +1458,12 @@
|
||||
"sourceRepoURL": "https://github.com/angular/protractor",
|
||||
"asOfVersion": "4.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "ps-list",
|
||||
"typingsPackageName": "ps-list",
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/ps-list",
|
||||
"asOfVersion": "6.2.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "qiniu",
|
||||
"typingsPackageName": "qiniu",
|
||||
@@ -1398,6 +1482,12 @@
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/query-string",
|
||||
"asOfVersion": "6.3.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "quick-lru",
|
||||
"typingsPackageName": "quick-lru",
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/quick-lru",
|
||||
"asOfVersion": "3.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "Raven JS",
|
||||
"typingsPackageName": "raven-js",
|
||||
@@ -1524,6 +1614,12 @@
|
||||
"sourceRepoURL": "https://github.com/tanem/react-svg",
|
||||
"asOfVersion": "5.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "read-chunk",
|
||||
"typingsPackageName": "read-chunk",
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/read-chunk",
|
||||
"asOfVersion": "3.1.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "realm",
|
||||
"typingsPackageName": "realm",
|
||||
@@ -1698,6 +1794,12 @@
|
||||
"sourceRepoURL": "https://github.com/zeh/simplesignal",
|
||||
"asOfVersion": "1.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "@sindresorhus/slugify",
|
||||
"typingsPackageName": "sindresorhus__slugify",
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/slugify",
|
||||
"asOfVersion": "0.9.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "sip.js",
|
||||
"typingsPackageName": "sip.js",
|
||||
@@ -1824,6 +1926,12 @@
|
||||
"sourceRepoURL": "https://github.com/terser-js/terser",
|
||||
"asOfVersion": "3.12.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "time-span",
|
||||
"typingsPackageName": "time-span",
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/time-span",
|
||||
"asOfVersion": "3.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "timezonecomplete",
|
||||
"typingsPackageName": "timezonecomplete",
|
||||
@@ -1836,6 +1944,12 @@
|
||||
"sourceRepoURL": "https://github.com/blakeembrey/title-case",
|
||||
"asOfVersion": "1.1.2"
|
||||
},
|
||||
{
|
||||
"libraryName": "trash",
|
||||
"typingsPackageName": "trash",
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/trash",
|
||||
"asOfVersion": "5.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "TsMonad",
|
||||
"typingsPackageName": "tsmonad",
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
import boxen = require('boxen');
|
||||
|
||||
boxen('unicorn'); // $ExpectType string
|
||||
boxen('unicorn', { borderColor: 'black' }); // $ExpectType string
|
||||
boxen('unicorn', { borderStyle: 'double' }); // $ExpectType string
|
||||
boxen('unicorn', { borderStyle: 'foo' }); // $ExpectError
|
||||
// $ExpectType string
|
||||
boxen('unicorn', {
|
||||
borderStyle: {
|
||||
topLeft: '+',
|
||||
topRight: '+',
|
||||
bottomLeft: '+',
|
||||
bottomRight: '+',
|
||||
horizontal: '-',
|
||||
vertical: '|',
|
||||
},
|
||||
});
|
||||
boxen('unicorn', { dimBorder: true }); // $ExpectType string
|
||||
boxen('unicorn', { padding: 1 }); // $ExpectType string
|
||||
boxen('unicorn', { padding: { top: 1 } }); // $ExpectType string
|
||||
boxen('unicorn', { padding: { right: 1 } }); // $ExpectType string
|
||||
boxen('unicorn', { padding: { bottom: 1 } }); // $ExpectType string
|
||||
boxen('unicorn', { padding: { left: 1 } }); // $ExpectType string
|
||||
boxen('unicorn', { margin: 1 }); // $ExpectType string
|
||||
boxen('unicorn', { margin: { top: 1 } }); // $ExpectType string
|
||||
boxen('unicorn', { margin: { right: 1 } }); // $ExpectType string
|
||||
boxen('unicorn', { margin: { bottom: 1 } }); // $ExpectType string
|
||||
boxen('unicorn', { margin: { left: 1 } }); // $ExpectType string
|
||||
boxen('unicorn', { float: 'right' }); // $ExpectType string
|
||||
boxen('unicorn', { float: 'center' }); // $ExpectType string
|
||||
boxen('unicorn', { float: 'left' }); // $ExpectType string
|
||||
boxen('unicorn', { float: 'foo' }); // $ExpectError
|
||||
boxen('unicorn', { backgroundColor: 'white' }); // $ExpectType string
|
||||
boxen('unicorn', { align: 'left' }); // $ExpectType string
|
||||
boxen('unicorn', { align: 'center' }); // $ExpectType string
|
||||
boxen('unicorn', { align: 'right' }); // $ExpectType string
|
||||
boxen('unicorn', { align: 'foo' }); // $ExpectError
|
||||
Vendored
-114
@@ -1,114 +0,0 @@
|
||||
// Type definitions for boxen 2.1
|
||||
// Project: https://github.com/sindresorhus/boxen#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
import { BoxDefinition, BoxNames } from 'cli-boxes';
|
||||
|
||||
export = boxen;
|
||||
|
||||
/**
|
||||
* Create boxes in the terminal
|
||||
* @param input Text inside the box.
|
||||
*/
|
||||
declare function boxen(input: string, options?: boxen.Options): string;
|
||||
|
||||
declare namespace boxen {
|
||||
interface Options {
|
||||
/**
|
||||
* Color of the box border.
|
||||
* Values: `black` `red` `green` `yellow` `blue` `magenta` `cyan` `white` `gray` or a hex value like `#ff0000`
|
||||
*/
|
||||
borderColor?: string;
|
||||
|
||||
/**
|
||||
* Style of the box border.
|
||||
* Can be any of the above predefined styles or an object.
|
||||
*
|
||||
* Predefined values:
|
||||
* - `single`
|
||||
* ```
|
||||
* ┌───┐
|
||||
* │foo│
|
||||
* └───┘
|
||||
* ```
|
||||
* - `double`
|
||||
* ```
|
||||
* ╔═══╗
|
||||
* ║foo║
|
||||
* ╚═══╝
|
||||
* ```
|
||||
* - `round` (`single` sides with round corners)
|
||||
* ```
|
||||
* ╭───╮
|
||||
* │foo│
|
||||
* ╰───╯
|
||||
* ```
|
||||
* - `single-double` (`single` on top and bottom, `double` on right and left)
|
||||
* ```
|
||||
* ╓───╖
|
||||
* ║foo║
|
||||
* ╙───╜
|
||||
* ```
|
||||
* - `double-single` (`double` on top and bottom, `single` on right and left)
|
||||
* ```
|
||||
* ╒═══╕
|
||||
* │foo│
|
||||
* ╘═══╛
|
||||
* ```
|
||||
* - `classic`
|
||||
* ```
|
||||
* +---+
|
||||
* |foo|
|
||||
* +---+
|
||||
* ```
|
||||
*/
|
||||
borderStyle?: BoxNames | BoxDefinition;
|
||||
|
||||
/**
|
||||
* Reduce opacity of the border.
|
||||
* @default false
|
||||
*/
|
||||
dimBorder?: boolean;
|
||||
|
||||
/**
|
||||
* Space between the text and box border.
|
||||
* When a number is specified, the left/right padding is 3 times the top/bottom to make it look nice.
|
||||
* @default 0
|
||||
*/
|
||||
padding?: number | PositionOptions;
|
||||
|
||||
/**
|
||||
* Space around the box.
|
||||
* When a number is specified, the left/right margin is 3 times the top/bottom to make it look nice.
|
||||
* @default 0
|
||||
*/
|
||||
margin?: number | PositionOptions;
|
||||
|
||||
/**
|
||||
* Float the box on the available terminal screen space.
|
||||
* @default 'left'
|
||||
*/
|
||||
float?: 'right' | 'center' | 'left';
|
||||
|
||||
/**
|
||||
* Color of the background.
|
||||
* Values: `black` `red` `green` `yellow` `blue` `magenta` `cyan` `white` `gray` or a hex value like `#ff0000`
|
||||
*/
|
||||
backgroundColor?: string;
|
||||
|
||||
/**
|
||||
* Align the text in the box based on the widest line.
|
||||
* @default 'left'
|
||||
*/
|
||||
align?: 'left' | 'center' | 'right';
|
||||
}
|
||||
|
||||
interface PositionOptions {
|
||||
top?: number;
|
||||
right?: number;
|
||||
bottom?: number;
|
||||
left?: number;
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"boxen-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -1,7 +1,6 @@
|
||||
import * as http from 'http';
|
||||
import * as https from 'https';
|
||||
import CacheableRequest = require('cacheable-request');
|
||||
import QuickLRU = require('quick-lru');
|
||||
|
||||
// You can do
|
||||
let cacheableRequest = new CacheableRequest(http.request);
|
||||
@@ -14,7 +13,6 @@ cacheableRequest = new CacheableRequest(https.request);
|
||||
|
||||
cacheableRequest = new CacheableRequest(http.request, 'redis://user:pass@localhost:6379');
|
||||
cacheableRequest = new CacheableRequest(http.request, new Map());
|
||||
cacheableRequest = new CacheableRequest(http.request, new QuickLRU({ maxSize: 1000 }));
|
||||
|
||||
cacheableRequest('example.com', res => {
|
||||
res; // $ExpectType ServerResponse | ResponseLike
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
import copy = require('copy-text-to-clipboard');
|
||||
|
||||
const button: HTMLButtonElement | null = <HTMLButtonElement> document.getElementById('my-button');
|
||||
if (button) {
|
||||
button.addEventListener('click', () => {
|
||||
copy('🦄🌈');
|
||||
});
|
||||
}
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
// Type definitions for copy-text-to-clipboard 1.0
|
||||
// Project: https://github.com/sindresorhus/copy-text-to-clipboard#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = copy;
|
||||
|
||||
declare function copy(text: string): boolean;
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"copy-text-to-clipboard-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"no-angle-bracket-type-assertion": false
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
import cpFile = require('cp-file');
|
||||
|
||||
cpFile('src/unicorn.png', 'dist/unicorn.png').then(() => {});
|
||||
cpFile('src/unicorn.png', 'dist/unicorn.png', {overwrite: false}).then(() => {});
|
||||
cpFile('src/unicorn.png', 'dist/unicorn.png')
|
||||
.on('progress', data => {
|
||||
let str: string;
|
||||
let num: number;
|
||||
|
||||
str = data.src;
|
||||
str = data.dest;
|
||||
num = data.size;
|
||||
num = data.written;
|
||||
num = data.percent;
|
||||
})
|
||||
.then(() => {});
|
||||
|
||||
cpFile.sync('src/unicorn.png', 'dist/unicorn.png');
|
||||
cpFile.sync('src/unicorn.png', 'dist/unicorn.png', {overwrite: false});
|
||||
Vendored
-28
@@ -1,28 +0,0 @@
|
||||
// Type definitions for cp-file 4.2
|
||||
// Project: https://github.com/sindresorhus/cp-file#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = cpFile;
|
||||
|
||||
declare function cpFile(source: string, destination: string, options?: cpFile.Options): Promise<void> & cpFile.ProgressEmitter;
|
||||
|
||||
declare namespace cpFile {
|
||||
function sync(source: string, destination: string, options?: Options): void;
|
||||
|
||||
interface ProgressEmitter {
|
||||
on(event: 'progress', handler: (data: ProgressData) => void): Promise<void>;
|
||||
}
|
||||
|
||||
interface Options {
|
||||
overwrite?: boolean;
|
||||
}
|
||||
|
||||
interface ProgressData {
|
||||
src: string;
|
||||
dest: string;
|
||||
size: number;
|
||||
written: number;
|
||||
percent: number;
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"cp-file-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -1,18 +0,0 @@
|
||||
import cpy = require('cpy');
|
||||
|
||||
cpy(['src/*.png', '!src/goat.png'], 'dist').then(() => {});
|
||||
cpy('foo.js', 'destination', {
|
||||
rename: basename => `prefix-${basename}`,
|
||||
cwd: '/',
|
||||
parents: true,
|
||||
stat: true,
|
||||
overwrite: false,
|
||||
});
|
||||
cpy('foo.js', 'destination')
|
||||
.on('progress', progress => {
|
||||
let num: number;
|
||||
num = progress.completedFiles;
|
||||
num = progress.totalFiles;
|
||||
num = progress.completedSize;
|
||||
})
|
||||
.then(() => {});
|
||||
Vendored
-31
@@ -1,31 +0,0 @@
|
||||
// Type definitions for cpy 5.1
|
||||
// Project: https://github.com/sindresorhus/cpy#readme
|
||||
// Definitions by: Mohamed Hegazy <https://github.com/mhegazy>
|
||||
// BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import glob = require('glob');
|
||||
import cpFile = require('cp-file');
|
||||
|
||||
export = cpy;
|
||||
declare function cpy(files: string | string[], destination: string, opts?: cpy.Options): Promise<void> & cpy.ProgressEmitter;
|
||||
|
||||
declare namespace cpy {
|
||||
interface ProgressEmitter {
|
||||
on(event: 'progress', handler: (progress: ProgressData) => void): Promise<void>;
|
||||
}
|
||||
|
||||
type Options = CpyOptions & glob.IOptions & cpFile.Options;
|
||||
|
||||
interface CpyOptions {
|
||||
cwd?: string;
|
||||
parents?: boolean;
|
||||
rename?: string | ((basename: string) => string);
|
||||
}
|
||||
|
||||
interface ProgressData {
|
||||
completedFiles: number;
|
||||
totalFiles: number;
|
||||
completedSize: number;
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"cpy-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -1,4 +0,0 @@
|
||||
import decamelize = require('decamelize');
|
||||
|
||||
decamelize('unicornRainbow');
|
||||
decamelize('unicornRainbow', '-');
|
||||
Vendored
-9
@@ -1,9 +0,0 @@
|
||||
// Type definitions for decamelize 1.2
|
||||
// Project: https://github.com/sindresorhus/decamelize
|
||||
// Definitions by: Sam Verschueren <https://github.com/samverschueren>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = decamelize;
|
||||
|
||||
declare function decamelize(input: string, separator?: string): string;
|
||||
declare namespace decamelize {}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"decamelize-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -1,8 +0,0 @@
|
||||
import fileType = require("file-type");
|
||||
|
||||
// $ExpectType FileTypeResult | null
|
||||
fileType(new Buffer([0xFF, 0xD8, 0xFF]));
|
||||
fileType(new Uint8Array([0xFF, 0xD8, 0xFF]));
|
||||
|
||||
// $ExpectType number
|
||||
fileType.minimumBytes;
|
||||
Vendored
-34
@@ -1,34 +0,0 @@
|
||||
// Type definitions for file-type 10.6
|
||||
// Project: https://github.com/sindresorhus/file-type
|
||||
// Definitions by: KIM Jaesuck a.k.a. gim tcaesvk <https://github.com/tcaesvk>
|
||||
// BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
export = FileType;
|
||||
|
||||
/**
|
||||
* The file type is detected by checking the
|
||||
* [magic number](http://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer.
|
||||
*
|
||||
* @param buf It only needs the first `.minimumBytes` bytes. The exception is detection of
|
||||
* `docx`, `pptx`, and `xlsx` which potentially requires reading the whole file.
|
||||
* @returns an Object with:
|
||||
* - ext - One of the [supported file types](https://github.com/sindresorhus/file-type/blob/master/readme.md#supported-file-types)
|
||||
* - mime - The [MIME type](http://en.wikipedia.org/wiki/Internet_media_type)
|
||||
*/
|
||||
declare function FileType(buf: Buffer | Uint8Array): FileType.FileTypeResult | null;
|
||||
|
||||
declare namespace FileType {
|
||||
interface FileTypeResult {
|
||||
ext: string;
|
||||
mime: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* The minimum amount of bytes needed to detect a file type. Currently,
|
||||
* it's 4100 bytes, but it can change, so don't hard-code it.
|
||||
*/
|
||||
const minimumBytes: number;
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"file-type-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -6,7 +6,6 @@ import * as fs from 'fs';
|
||||
import * as http from 'http';
|
||||
import * as https from 'https';
|
||||
import * as url from 'url';
|
||||
import QuickLRU = require('quick-lru');
|
||||
import tough = require('tough-cookie');
|
||||
|
||||
let str: string;
|
||||
@@ -252,10 +251,6 @@ got('todomvc', {
|
||||
cache: new Keyv(),
|
||||
}).then(res => res.fromCache);
|
||||
|
||||
got('todomvc', {
|
||||
cache: new QuickLRU({maxSize: 10}),
|
||||
}).then(res => res.fromCache);
|
||||
|
||||
got(new url.URL('http://todomvc.com'));
|
||||
|
||||
got(url.parse('http://todomvc.com'));
|
||||
|
||||
@@ -6,7 +6,6 @@ import * as fs from 'fs';
|
||||
import * as http from 'http';
|
||||
import * as https from 'https';
|
||||
import * as url from 'url';
|
||||
import QuickLRU = require('quick-lru');
|
||||
|
||||
let str: string;
|
||||
let buf: Buffer;
|
||||
@@ -251,10 +250,6 @@ got('todomvc', {
|
||||
cache: new Keyv(),
|
||||
}).then(res => res.fromCache);
|
||||
|
||||
got('todomvc', {
|
||||
cache: new QuickLRU({maxSize: 10}),
|
||||
}).then(res => res.fromCache);
|
||||
|
||||
got(new url.URL('http://todomvc.com'));
|
||||
|
||||
got(url.parse('http://todomvc.com'));
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
import humanizeString = require('humanize-string');
|
||||
|
||||
humanizeString('UnicornsAndRainbows');
|
||||
humanizeString('unicorns_and-Rainbows_andPonies ');
|
||||
Vendored
-8
@@ -1,8 +0,0 @@
|
||||
// Type definitions for humanize-string 1.0
|
||||
// Project: https://github.com/sindresorhus/humanize-string/
|
||||
// Definitions by: Kevin Nacios <https://github.com/ragnarok56>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare function humanizeString(text: string): string;
|
||||
|
||||
export = humanizeString;
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"humanize-string-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -1,4 +0,0 @@
|
||||
import imageType = require('file-type');
|
||||
|
||||
imageType(new Buffer([0xFF, 0xD8, 0xFF]));
|
||||
imageType(new Uint8Array([0xFF, 0xD8, 0xFF]));
|
||||
Vendored
-12
@@ -1,12 +0,0 @@
|
||||
// Type definitions for image-type 3.0
|
||||
// Project: https://github.com/sindresorhus/image-type#readme
|
||||
// Definitions by: Florian Keller <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
import FileType = require('file-type');
|
||||
|
||||
declare function ImageType(buf: Buffer | Uint8Array): FileType.FileTypeResult | null;
|
||||
|
||||
export = ImageType;
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"image-type-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
-13
@@ -1,13 +0,0 @@
|
||||
// Type definitions for is-svg 3.0
|
||||
// Project: https://github.com/sindresorhus/is-svg#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
declare function isSvg(input?: string | Buffer | false | null): boolean;
|
||||
|
||||
// So that `import * as X` is possible
|
||||
declare namespace isSvg {}
|
||||
|
||||
export = isSvg;
|
||||
@@ -1,11 +0,0 @@
|
||||
import * as isSvg from 'is-svg';
|
||||
|
||||
const data = '<svg></svg>';
|
||||
let result = false;
|
||||
|
||||
result = isSvg(data);
|
||||
result = isSvg(Buffer.from(data));
|
||||
result = isSvg(false);
|
||||
result = isSvg(null);
|
||||
result = isSvg(undefined);
|
||||
result = isSvg();
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"is-svg-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -1,5 +1,4 @@
|
||||
import Keyv = require('keyv');
|
||||
import QuickLRU = require('quick-lru');
|
||||
|
||||
new Keyv({
|
||||
uri: 'redis://user:pass@localhost:6379',
|
||||
@@ -21,10 +20,6 @@ new Keyv<boolean>({ deserialize: JSON.parse });
|
||||
|
||||
new Keyv<boolean>({ store: new Map() });
|
||||
|
||||
const lru = new QuickLRU<string, boolean>({ maxSize: 1000 });
|
||||
const opts: Keyv.Options<boolean> = { store: lru };
|
||||
new Keyv(opts);
|
||||
|
||||
new Keyv('mongodb://user:pass@localhost:27017/dbname', { namespace: 'mongodb' });
|
||||
new Keyv('redis://user:pass@localhost:6379');
|
||||
new Keyv('sqlite://path/to/database.sqlite');
|
||||
|
||||
Vendored
-12
@@ -1,12 +0,0 @@
|
||||
// Type definitions for npm-name 5.0
|
||||
// Project: https://github.com/sindresorhus/npm-name#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = npmName;
|
||||
|
||||
declare function npmName(name: string): Promise<boolean>;
|
||||
|
||||
declare namespace npmName {
|
||||
function many<T extends string>(names: T[]): Promise<Map<T, boolean>>;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
import npmName = require('npm-name');
|
||||
|
||||
// $ExpectType Promise<boolean>
|
||||
npmName('chalk');
|
||||
|
||||
npmName.many(['chalk', '@sindresorhus/is', 'abc123']).then(result => {
|
||||
// $ExpectType Map<"chalk" | "@sindresorhus/is" | "abc123", boolean>
|
||||
result;
|
||||
|
||||
// $ExpectType boolean | undefined
|
||||
result.get('chalk');
|
||||
});
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"npm-name-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
-45
@@ -1,45 +0,0 @@
|
||||
// Type definitions for npm-run-path 2.0
|
||||
// Project: https://github.com/sindresorhus/npm-run-path#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = npmRunPath;
|
||||
|
||||
/**
|
||||
* Get your [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) prepended with locally installed binaries.
|
||||
*/
|
||||
declare function npmRunPath(options?: npmRunPath.Options): string;
|
||||
|
||||
declare namespace npmRunPath {
|
||||
function env(options?: EnvOptions): ProcessEnv;
|
||||
|
||||
interface Options {
|
||||
/**
|
||||
* Working directory.
|
||||
*/
|
||||
cwd?: string;
|
||||
/**
|
||||
* PATH to be appended.
|
||||
* Set it to an empty string to exclude the default [PATH](https://github.com/sindresorhus/path-key).
|
||||
* @default PATH
|
||||
*/
|
||||
path?: string;
|
||||
}
|
||||
|
||||
interface EnvOptions {
|
||||
/**
|
||||
* Working directory.
|
||||
*/
|
||||
cwd?: string;
|
||||
/**
|
||||
* Accepts an object of environment variables, like `process.env`, and modifies the PATH using the correct
|
||||
* [PATH key](https://github.com/sindresorhus/path-key). Use this if you're modifying the PATH for use
|
||||
* in the `child_process` options.
|
||||
*/
|
||||
env?: ProcessEnv;
|
||||
}
|
||||
|
||||
interface ProcessEnv {
|
||||
[key: string]: string | undefined;
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
/// <reference types="node" />
|
||||
|
||||
import childProcess = require('child_process');
|
||||
import npmRunPath = require('npm-run-path');
|
||||
|
||||
npmRunPath(); // $ExpectType string
|
||||
npmRunPath({ cwd: '/foo' }); // $ExpectType string
|
||||
npmRunPath({ path: '/usr/local/bin' }); // $ExpectType string
|
||||
|
||||
npmRunPath.env(); // $ExpectType ProcessEnv
|
||||
npmRunPath.env({ cwd: '/foo' }); // $ExpectType ProcessEnv
|
||||
npmRunPath.env({ env: process.env }); // $ExpectType ProcessEnv
|
||||
|
||||
childProcess.execFileSync('foo', {
|
||||
env: npmRunPath.env(),
|
||||
});
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"npm-run-path-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
-22
@@ -1,22 +0,0 @@
|
||||
// Type definitions for p-some 2.0
|
||||
// Project: https://github.com/sindresorhus/p-some#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
import AggregateErrorModule = require('aggregate-error');
|
||||
|
||||
export = pSome;
|
||||
|
||||
declare function pSome<T>(values: Array<Value<T>> | Iterable<Value<T>>, options: pSome.Options<T>): Promise<T[]>;
|
||||
|
||||
type Value<T> = T | PromiseLike<T>;
|
||||
|
||||
declare namespace pSome {
|
||||
interface Options<T> {
|
||||
count: number;
|
||||
filter?(value: T): boolean;
|
||||
}
|
||||
|
||||
const AggregateError: typeof AggregateErrorModule;
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
import got = require('got');
|
||||
import pSome = require('p-some');
|
||||
|
||||
pSome([
|
||||
got.head('github.com').then(() => 'github'),
|
||||
got.head('google.com').then(() => 'google'),
|
||||
got.head('twitter.com').then(() => 'twitter'),
|
||||
got.head('medium.com').then(() => 'medium')
|
||||
], {count: 2}).then(([first, second]) => {
|
||||
console.log(first, second);
|
||||
});
|
||||
|
||||
pSome<string | number>([
|
||||
got.head('github.com').then(() => 1),
|
||||
got.head('google.com').then(() => 'google'),
|
||||
], {count: 2}).then(([first, second]) => {
|
||||
const str: string | number = first;
|
||||
});
|
||||
|
||||
pSome(new Set([
|
||||
got.head('github.com').then(() => 'github'),
|
||||
got.head('google.com').then(() => 'google'),
|
||||
got.head('twitter.com').then(() => 'twitter'),
|
||||
got.head('medium.com').then(() => 'medium')
|
||||
]), {
|
||||
count: 3,
|
||||
filter(str: string) {
|
||||
return false;
|
||||
}
|
||||
}).then(first => {
|
||||
const str: string[] = first;
|
||||
});
|
||||
|
||||
throw new pSome.AggregateError([]);
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"p-some-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
-17
@@ -1,17 +0,0 @@
|
||||
// Type definitions for path-key 2.0
|
||||
// Project: https://github.com/sindresorhus/path-key#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
export = pathKey;
|
||||
|
||||
declare function pathKey(options?: pathKey.Options): string;
|
||||
|
||||
declare namespace pathKey {
|
||||
interface Options {
|
||||
env?: { [key: string]: any };
|
||||
platform?: NodeJS.Platform;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
import pathKey = require('path-key');
|
||||
|
||||
pathKey(); // $ExpectType string
|
||||
pathKey({ env: {} }); // $ExpectType string
|
||||
pathKey({ platform: 'win32' }); // $ExpectType string
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"path-key-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
-24
@@ -1,24 +0,0 @@
|
||||
// Type definitions for ps-list 6.0
|
||||
// Project: https://github.com/sindresorhus/ps-list#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
export = psList;
|
||||
|
||||
declare function psList(options?: psList.Options): Promise<psList.ProcessDescriptor[]>;
|
||||
|
||||
declare namespace psList {
|
||||
interface Options {
|
||||
all?: boolean;
|
||||
}
|
||||
|
||||
interface ProcessDescriptor {
|
||||
pid: number;
|
||||
name: string;
|
||||
ppid: number;
|
||||
cmd?: string;
|
||||
cpu?: number;
|
||||
memory?: number;
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
import psList = require('ps-list');
|
||||
|
||||
(async () => {
|
||||
const processes: psList.ProcessDescriptor[] = await psList();
|
||||
psList({ all: false });
|
||||
|
||||
processes[0].pid; // $ExpectType number
|
||||
processes[0].name; // $ExpectType string
|
||||
processes[0].ppid; // $ExpectType number
|
||||
processes[0].cmd; // $ExpectType string | undefined
|
||||
processes[0].cpu; // $ExpectType number | undefined
|
||||
processes[0].memory; // $ExpectType number | undefined
|
||||
})();
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"ps-list-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
-26
@@ -1,26 +0,0 @@
|
||||
// Type definitions for quick-lru 2.0
|
||||
// Project: https://github.com/sindresorhus/quick-lru#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = QuickLRU;
|
||||
|
||||
declare class QuickLRU<K, V> implements Iterable<[K, V]> {
|
||||
readonly size: number;
|
||||
constructor(options: QuickLRU.Options);
|
||||
[Symbol.iterator](): Iterator<[K, V]>;
|
||||
set(key: K, value: V): this;
|
||||
get(key: K): V | undefined;
|
||||
has(key: K): boolean;
|
||||
peek(key: K): V | undefined;
|
||||
delete(key: K): boolean;
|
||||
clear(): void;
|
||||
keys(): Iterable<K>;
|
||||
values(): Iterable<V>;
|
||||
}
|
||||
|
||||
declare namespace QuickLRU {
|
||||
interface Options {
|
||||
maxSize: number;
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
import QuickLRU = require('quick-lru');
|
||||
|
||||
const lru = new QuickLRU<string, number>({ maxSize: 1000 });
|
||||
new QuickLRU<string, number>(); // $ExpectError
|
||||
|
||||
lru.set('🦄', 1).set('🌈', 2); // $ExpectType QuickLRU<string, number>
|
||||
lru.get('🦄'); // $ExpectType number | undefined
|
||||
lru.has('🦄'); // $ExpectType boolean
|
||||
lru.peek('🦄'); // $ExpectType number | undefined
|
||||
lru.delete('🦄'); // $ExpectType boolean
|
||||
lru.clear(); // $ExpectType void
|
||||
lru.size; // $ExpectType number
|
||||
|
||||
for (const [key, value] of lru) {
|
||||
key; // $ExpectType string
|
||||
value; // $ExpectType number
|
||||
}
|
||||
|
||||
for (const key of lru.keys()) {
|
||||
key; // $ExpectType string
|
||||
}
|
||||
|
||||
for (const value of lru.values()) {
|
||||
value; // $ExpectType number
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es2015",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"quick-lru-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
-26
@@ -1,26 +0,0 @@
|
||||
// Type definitions for quick-lru 1.1
|
||||
// Project: https://github.com/sindresorhus/quick-lru#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = QuickLRU;
|
||||
|
||||
declare class QuickLRU<K, V> implements Iterable<[K, V]> {
|
||||
readonly size: number;
|
||||
constructor(options?: QuickLRU.Options);
|
||||
[Symbol.iterator](): Iterator<[K, V]>;
|
||||
set(key: K, value: V): this;
|
||||
get(key: K): V | undefined;
|
||||
has(key: K): boolean;
|
||||
peek(key: K): V | undefined;
|
||||
delete(key: K): void;
|
||||
clear(): void;
|
||||
keys(): Iterable<K>;
|
||||
values(): Iterable<V>;
|
||||
}
|
||||
|
||||
declare namespace QuickLRU {
|
||||
interface Options {
|
||||
maxSize: number;
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
import QuickLRU = require('quick-lru');
|
||||
|
||||
let num: number;
|
||||
let numu: number | undefined;
|
||||
let str: string;
|
||||
let bool: boolean;
|
||||
|
||||
const lru = new QuickLRU<string, number>({maxSize: 1000});
|
||||
|
||||
lru.set('🦄', 1).set('🌈', 2);
|
||||
numu = lru.get('🦄');
|
||||
bool = lru.has('🦄');
|
||||
numu = lru.peek('🦄');
|
||||
lru.delete('🦄');
|
||||
lru.clear();
|
||||
num = lru.size;
|
||||
|
||||
for (const [key, value] of lru) {
|
||||
str = key;
|
||||
num = value;
|
||||
}
|
||||
|
||||
for (const key of lru.keys()) {
|
||||
str = key;
|
||||
}
|
||||
|
||||
for (const value of lru.values()) {
|
||||
num = value;
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es2015",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../../",
|
||||
"typeRoots": [
|
||||
"../../"
|
||||
],
|
||||
"paths": {
|
||||
"quick-lru": [
|
||||
"quick-lru/v1"
|
||||
]
|
||||
},
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"quick-lru-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
-29
@@ -1,29 +0,0 @@
|
||||
// Type definitions for read-chunk v2.1.0
|
||||
// Project: https://github.com/sindresorhus/read-chunk
|
||||
// Definitions by: crispybee <https://github.com/crispybee>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
export = ReadChunk;
|
||||
|
||||
/**
|
||||
* Asynchronous: Reads a chunk from a file. Returns a Promise<Buffer>.
|
||||
* @param {string} filePath The path to the file.
|
||||
* @param {number} startingPosition Position to start reading.
|
||||
* @param {number} length Number of bytes to read.
|
||||
* @return {Promise<Buffer>} Returns a Promise<Buffer>.
|
||||
*/
|
||||
declare function ReadChunk(filePath: string, startingPosition: number, length: number): Promise<Buffer>;
|
||||
|
||||
declare namespace ReadChunk {
|
||||
/**
|
||||
* Synchronous: Reads a chunk from a file. Returns a Buffer.
|
||||
* @param {string} filePath The path to the file.
|
||||
* @param {number} startingPosition Position to start reading.
|
||||
* @param {number} length Number of bytes to read.
|
||||
* @return {Buffer} Returns a Buffer.
|
||||
*/
|
||||
function sync(filePath: string, startingPosition: number, length: number): Buffer;
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
import readChunk = require('read-chunk');
|
||||
|
||||
let chunk: Buffer = readChunk.sync('foo.txt', 1, 3);
|
||||
|
||||
readChunk('foo.txt', 1, 3).then(value => {
|
||||
console.log(value);
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
});
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"read-chunk-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"adjacent-overload-signatures": false,
|
||||
"array-type": false,
|
||||
"arrow-return-shorthand": false,
|
||||
"ban-types": false,
|
||||
"callable-types": false,
|
||||
"comment-format": false,
|
||||
"dt-header": false,
|
||||
"eofline": false,
|
||||
"export-just-namespace": false,
|
||||
"import-spacing": false,
|
||||
"interface-name": false,
|
||||
"interface-over-type-literal": false,
|
||||
"jsdoc-format": false,
|
||||
"max-line-length": false,
|
||||
"member-access": false,
|
||||
"new-parens": false,
|
||||
"no-any-union": false,
|
||||
"no-boolean-literal-compare": false,
|
||||
"no-conditional-assignment": false,
|
||||
"no-consecutive-blank-lines": false,
|
||||
"no-construct": false,
|
||||
"no-declare-current-package": false,
|
||||
"no-duplicate-imports": false,
|
||||
"no-duplicate-variable": false,
|
||||
"no-empty-interface": false,
|
||||
"no-for-in-array": false,
|
||||
"no-inferrable-types": false,
|
||||
"no-internal-module": false,
|
||||
"no-irregular-whitespace": false,
|
||||
"no-mergeable-namespace": false,
|
||||
"no-misused-new": false,
|
||||
"no-namespace": false,
|
||||
"no-object-literal-type-assertion": false,
|
||||
"no-padding": false,
|
||||
"no-redundant-jsdoc": false,
|
||||
"no-redundant-jsdoc-2": false,
|
||||
"no-redundant-undefined": false,
|
||||
"no-reference-import": false,
|
||||
"no-relative-import-in-test": false,
|
||||
"no-self-import": false,
|
||||
"no-single-declare-module": false,
|
||||
"no-string-throw": false,
|
||||
"no-unnecessary-callback-wrapper": false,
|
||||
"no-unnecessary-class": false,
|
||||
"no-unnecessary-generics": false,
|
||||
"no-unnecessary-qualifier": false,
|
||||
"no-unnecessary-type-assertion": false,
|
||||
"no-useless-files": false,
|
||||
"no-var-keyword": false,
|
||||
"no-var-requires": false,
|
||||
"no-void-expression": false,
|
||||
"no-trailing-whitespace": false,
|
||||
"object-literal-key-quotes": false,
|
||||
"object-literal-shorthand": false,
|
||||
"one-line": false,
|
||||
"one-variable-per-declaration": false,
|
||||
"only-arrow-functions": false,
|
||||
"prefer-conditional-expression": false,
|
||||
"prefer-const": false,
|
||||
"prefer-declare-function": false,
|
||||
"prefer-for-of": false,
|
||||
"prefer-method-signature": false,
|
||||
"prefer-template": false,
|
||||
"radix": false,
|
||||
"semicolon": false,
|
||||
"space-before-function-paren": false,
|
||||
"space-within-parens": false,
|
||||
"strict-export-declare-modifiers": false,
|
||||
"trim-file": false,
|
||||
"triple-equals": false,
|
||||
"typedef-whitespace": false,
|
||||
"unified-signatures": false,
|
||||
"void-return": false,
|
||||
"whitespace": false
|
||||
}
|
||||
}
|
||||
-42
@@ -1,42 +0,0 @@
|
||||
// Type definitions for @sindresorhus/slugify 0.6
|
||||
// Project: https://github.com/sindresorhus/slugify
|
||||
// Definitions by: Carlos Precioso <https://github.com/cprecioso>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare namespace slugify {
|
||||
interface Options {
|
||||
/**
|
||||
* @default "-"
|
||||
*/
|
||||
separator?: string;
|
||||
|
||||
/**
|
||||
* Make the slug lowercase.
|
||||
* @default true
|
||||
*/
|
||||
lowercase?: boolean;
|
||||
|
||||
/**
|
||||
* Convert camelcase to separate words. Internally it does `fooBar` → `foo bar`.
|
||||
* @default true
|
||||
*/
|
||||
decamelize?: boolean;
|
||||
|
||||
/**
|
||||
* Specifying this only replaces the default if you set an item with the same key, like &.
|
||||
* The replacements are run on the original string before any other transformations.
|
||||
*
|
||||
* Add a leading and trailing space to the replacement to have it separated by dashes.
|
||||
*
|
||||
* @default [ ['&', ' and '], ['🦄', ' unicorn '], ['♥', ' love '] ]
|
||||
*/
|
||||
customReplacements?: ReadonlyArray<[string, string]>;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Slugify a string
|
||||
*/
|
||||
declare function slugify(input: string, options?: slugify.Options): string;
|
||||
|
||||
export = slugify;
|
||||
@@ -1,29 +0,0 @@
|
||||
import slugify = require("@sindresorhus/slugify");
|
||||
|
||||
slugify("I ♥ Dogs");
|
||||
|
||||
slugify(" Déjà Vu! ");
|
||||
|
||||
slugify("fooBar 123 $#%");
|
||||
|
||||
slugify("I ♥ 🦄 & 🐶", { customReplacements: [["🐶", "dog"]] });
|
||||
|
||||
slugify("BAR and baz");
|
||||
|
||||
slugify("BAR and baz", { separator: "_" });
|
||||
|
||||
slugify("Déjà Vu!");
|
||||
|
||||
slugify("Déjà Vu!", { lowercase: false });
|
||||
|
||||
slugify("fooBar");
|
||||
|
||||
slugify("fooBar", { decamelize: false });
|
||||
|
||||
slugify("Foo@unicorn", {
|
||||
customReplacements: [["@", "at"]]
|
||||
});
|
||||
|
||||
slugify("foo@unicorn", {
|
||||
customReplacements: [["@", " at "]]
|
||||
});
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": ["es6"],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": ["../"],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"paths": {
|
||||
"@sindresorhus/slugify": ["sindresorhus__slugify"]
|
||||
}
|
||||
},
|
||||
"files": ["index.d.ts", "sindresorhus__slugify-tests.ts"]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
-18
@@ -1,18 +0,0 @@
|
||||
// Type definitions for time-span 2.0
|
||||
// Project: https://github.com/sindresorhus/time-span#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Mike Dvorscak <https://github.com/mdvorscak>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare namespace timeSpan {
|
||||
interface TimeSpanObject {
|
||||
(): number;
|
||||
rounded(): number;
|
||||
sec(): number;
|
||||
nano(): number;
|
||||
}
|
||||
}
|
||||
|
||||
declare function timeSpan(): timeSpan.TimeSpanObject;
|
||||
|
||||
export = timeSpan;
|
||||
@@ -1,9 +0,0 @@
|
||||
import timeSpan = require('time-span');
|
||||
|
||||
const end = timeSpan();
|
||||
|
||||
let endTime: number;
|
||||
endTime = end();
|
||||
endTime = end.rounded();
|
||||
endTime = end.sec();
|
||||
endTime = end.nano();
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"time-span-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
-22
@@ -1,22 +0,0 @@
|
||||
// Type definitions for trash 4.3
|
||||
// Project: https://github.com/sindresorhus/trash#readme
|
||||
// Definitions by: Matthew James <https://github.com/matthew-matvei>
|
||||
// Keiichiro Amemiya <https://github.com/hoishin>
|
||||
// BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* Move files and folders to the trash
|
||||
*
|
||||
* @param paths Accepts paths and [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns).
|
||||
* @param options.glob Enable globbing when matching file paths
|
||||
*/
|
||||
declare function trash(paths: string | string[], options?: trash.Options): Promise<void>;
|
||||
|
||||
declare namespace trash {
|
||||
interface Options {
|
||||
glob: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
export = trash;
|
||||
@@ -1,20 +0,0 @@
|
||||
import trash = require('trash');
|
||||
|
||||
async function testTrashNoArgsSinglePath() {
|
||||
await trash('/path/to/item1');
|
||||
}
|
||||
|
||||
async function testTrashNoArgsMultiPath() {
|
||||
await trash(['/path/to/item1', '/path/to/item2']);
|
||||
}
|
||||
|
||||
async function testTrashWithArgs() {
|
||||
const options: trash.Options = { glob: false };
|
||||
await trash(['/path/to/item1', '/path/to/item2'], options);
|
||||
}
|
||||
|
||||
function testTrashPerDocumentation() {
|
||||
(async () => {
|
||||
await trash(['*.png', '!rainbow.png']);
|
||||
})();
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"target": "es2015",
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"trash-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user