-
-
Notifications
You must be signed in to change notification settings - Fork 934
/
typed.d.ts
74 lines (64 loc) · 1.94 KB
/
typed.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// This file contains type definitions that aren't just `export = any`
declare module 'cli-columns' {
function cliColumns (values: string[], opts?: { newline?: string, width?: number }): string
export = cliColumns;
}
declare module 'normalize-registry-url' {
function normalizeRegistryUrl (registry: string): string
export = normalizeRegistryUrl;
}
declare module 'normalize-newline' {
function normalizeNewline (text: string): string
export = normalizeNewline;
}
declare module 'path-name' {
const pathname: string;
export = pathname;
}
declare module 'right-pad' {
function rightPad (txt: string, size: number): string;
export = rightPad;
}
declare module 'semver-utils' {
export function parseRange (range: string): Array<{
semver?: string,
operator: string,
major?: string,
minor?: string,
patch?: string,
}>
}
declare module 'split-cmd' {
export function split (cmd: string): string[]
export function splitToObject (cmd: string): { command: string, args: string[] }
}
declare module 'strip-comments-strings' {
export interface CodeItem {
// What feature of the code has been found:
type: string,
// The indices of the feature in the original code string:
index: number,
indexEnd: number,
// The test of the feature
content: string
}
export interface CodeAttributes {
// The remaining code text after all features have been stripped:
text: string,
// The items found:
comments: CodeItem[],
regexes: CodeItem[],
strings: CodeItem[]
}
export function parseString (str: string): CodeAttributes;
export type CodeItemReplacer = (item: CodeItem) => string;
export function stripComments (
str: string, replacer?: CodeItemReplacer): string;
}
declare module 'bin-links/lib/fix-bin' {
function fixBin (path: string, execMode: number): Promise<void>;
export = fixBin;
}
declare namespace NodeJS.Module {
function _nodeModulePaths(from: string): string[]
}