Skip to content

Commit f9272d1

Browse files
committed
Update typings
1 parent 08496c3 commit f9272d1

File tree

15 files changed

+5087
-653
lines changed

15 files changed

+5087
-653
lines changed

custom-typings/object.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Node v4+ support Object.assign
2+
interface ObjectConstructor {
3+
assign(target: any, ...sources: any[]): any;
4+
}

scripts/tsconfig.json

+4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@
1212
"rewriteTsconfig": false
1313
},
1414
"filesGlob": [
15+
"../custom-typings/**/*.d.ts",
1516
"../typings/**/*.d.ts",
1617
"./*.ts"
1718
],
1819
"files": [
20+
"../custom-typings/object.d.ts",
21+
"../custom-typings/resolve.d.ts",
1922
"../typings/colors/colors.d.ts",
2023
"../typings/diff/diff.d.ts",
2124
"../typings/findup-sync/findup-sync.d.ts",
@@ -24,6 +27,7 @@
2427
"../typings/minimatch/minimatch.d.ts",
2528
"../typings/node/node.d.ts",
2629
"../typings/optimist/optimist.d.ts",
30+
"../typings/tsd.d.ts",
2731
"../typings/underscore.string/underscore.string.d.ts",
2832
"../typings/underscore/underscore.d.ts",
2933
"buildDocs.ts"

src/tsconfig.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.6.2",
2+
"version": "1.8.10",
33
"compilerOptions": {
44
"module": "commonjs",
55
"noImplicitAny": true,
@@ -22,6 +22,7 @@
2222
"./test/**/*.ts"
2323
],
2424
"files": [
25+
"../custom-typings/object.d.ts",
2526
"../custom-typings/resolve.d.ts",
2627
"../typings/colors/colors.d.ts",
2728
"../typings/diff/diff.d.ts",
@@ -31,6 +32,7 @@
3132
"../typings/minimatch/minimatch.d.ts",
3233
"../typings/node/node.d.ts",
3334
"../typings/optimist/optimist.d.ts",
35+
"../typings/tsd.d.ts",
3436
"../typings/underscore.string/underscore.string.d.ts",
3537
"../typings/underscore/underscore.d.ts",
3638
"configuration.ts",
@@ -157,4 +159,4 @@
157159
"test/parse.ts",
158160
"test/utils.ts"
159161
]
160-
}
162+
}

test/tsconfig.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.6.2",
2+
"version": "1.8.10",
33
"compilerOptions": {
44
"module": "commonjs",
55
"noImplicitAny": true,
@@ -20,6 +20,7 @@
2020
"./rule-tester/*.ts"
2121
],
2222
"files": [
23+
"../custom-typings/object.d.ts",
2324
"../custom-typings/resolve.d.ts",
2425
"../typings/colors/colors.d.ts",
2526
"../typings/diff/diff.d.ts",
@@ -29,6 +30,7 @@
2930
"../typings/minimatch/minimatch.d.ts",
3031
"../typings/node/node.d.ts",
3132
"../typings/optimist/optimist.d.ts",
33+
"../typings/tsd.d.ts",
3234
"../typings/underscore.string/underscore.string.d.ts",
3335
"../typings/underscore/underscore.d.ts",
3436
"typings/chai/chai.d.ts",
@@ -179,4 +181,4 @@
179181
"rule-tester/testData.ts",
180182
"rule-tester/utilsTests.ts"
181183
]
182-
}
184+
}

tsd.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,34 @@
66
"bundle": "typings/tsd.d.ts",
77
"installed": {
88
"colors/colors.d.ts": {
9-
"commit": "78ba6e41543e5ababbd1dda19797601be3c1f304"
9+
"commit": "e623c6b3164bb8c6da508f84f7865eaaa97e1a0f"
1010
},
1111
"diff/diff.d.ts": {
12-
"commit": "78ba6e41543e5ababbd1dda19797601be3c1f304"
12+
"commit": "e623c6b3164bb8c6da508f84f7865eaaa97e1a0f"
1313
},
1414
"findup-sync/findup-sync.d.ts": {
15-
"commit": "98d3168c2c570352a3a7393788e2ec9fbb08ade6"
15+
"commit": "e623c6b3164bb8c6da508f84f7865eaaa97e1a0f"
1616
},
1717
"glob/glob.d.ts": {
18-
"commit": "fb2b3b1e068c9ff7d8f9b0851c08d37d96c95c38"
18+
"commit": "e623c6b3164bb8c6da508f84f7865eaaa97e1a0f"
1919
},
2020
"js-yaml/js-yaml.d.ts": {
21-
"commit": "8ea42cd8bb11863ed6f242d67c502288ebc45a7b"
21+
"commit": "e623c6b3164bb8c6da508f84f7865eaaa97e1a0f"
2222
},
2323
"minimatch/minimatch.d.ts": {
24-
"commit": "98d3168c2c570352a3a7393788e2ec9fbb08ade6"
24+
"commit": "e623c6b3164bb8c6da508f84f7865eaaa97e1a0f"
2525
},
2626
"node/node.d.ts": {
27-
"commit": "98d3168c2c570352a3a7393788e2ec9fbb08ade6"
27+
"commit": "e623c6b3164bb8c6da508f84f7865eaaa97e1a0f"
2828
},
2929
"optimist/optimist.d.ts": {
30-
"commit": "e8f8e7471b8ca92ca417f8c878f64ae4d1067972"
30+
"commit": "e623c6b3164bb8c6da508f84f7865eaaa97e1a0f"
3131
},
3232
"underscore.string/underscore.string.d.ts": {
33-
"commit": "98d3168c2c570352a3a7393788e2ec9fbb08ade6"
33+
"commit": "e623c6b3164bb8c6da508f84f7865eaaa97e1a0f"
3434
},
3535
"underscore/underscore.d.ts": {
36-
"commit": "98d3168c2c570352a3a7393788e2ec9fbb08ade6"
36+
"commit": "e623c6b3164bb8c6da508f84f7865eaaa97e1a0f"
3737
}
3838
}
3939
}

typings/colors/colors.d.ts

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
// Type definitions for Colors.js 0.6.0-1
22
// Project: https://github.com/Marak/colors.js
33
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
4-
// Definitions: https://github.com/borisyankov/DefinitelyTyped
4+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
55

66
declare module "colors" {
77
interface Color {
88
(text: string): string;
99

10+
strip: Color;
11+
stripColors: Color;
12+
1013
black: Color;
1114
red: Color;
1215
green: Color;
@@ -41,11 +44,17 @@ declare module "colors" {
4144
america: Color;
4245
trap: Color;
4346
random: Color;
47+
zalgo: Color;
4448
}
4549

46-
module e {
50+
namespace e {
4751
export function setTheme(theme:any): void;
4852

53+
export var enabled: boolean;
54+
55+
export var strip: Color;
56+
export var stripColors: Color;
57+
4958
export var black: Color;
5059
export var red: Color;
5160
export var green: Color;
@@ -80,12 +89,16 @@ declare module "colors" {
8089
export var america: Color;
8190
export var trap: Color;
8291
export var random: Color;
92+
export var zalgo: Color;
8393
}
8494

8595
export = e;
8696
}
8797

8898
interface String {
99+
strip: string;
100+
stripColors: string;
101+
89102
black: string;
90103
red: string;
91104
green: string;
@@ -120,4 +133,5 @@ interface String {
120133
america: string;
121134
trap: string;
122135
random: string;
136+
zalgo: string;
123137
}

typings/diff/diff.d.ts

+33-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
// Type definitions for diff
22
// Project: https://github.com/kpdecker/jsdiff
33
// Definitions by: vvakame <https://github.com/vvakame/>
4-
// Definitions: https://github.com/borisyankov/DefinitelyTyped
4+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
55

6-
declare module JsDiff {
6+
declare namespace JsDiff {
77
interface IDiffResult {
88
value: string;
9+
count?: number;
910
added?: boolean;
1011
removed?: boolean;
1112
}
@@ -15,6 +16,22 @@ declare module JsDiff {
1516
componenets: IDiffResult[];
1617
}
1718

19+
interface IHunk {
20+
oldStart: number;
21+
oldLines: number;
22+
newStart: number;
23+
newLines: number;
24+
lines: string[];
25+
}
26+
27+
interface IUniDiff {
28+
oldFileName: string;
29+
newFileName: string;
30+
oldHeader: string;
31+
newHeader: string;
32+
hunks: IHunk[];
33+
}
34+
1835
class Diff {
1936
ignoreWhitespace:boolean;
2037

@@ -45,9 +62,21 @@ declare module JsDiff {
4562

4663
function diffCss(oldStr:string, newStr:string):IDiffResult[];
4764

48-
function createPatch(fileName:string, oldStr:string, newStr:string, oldHeader:string, newHeader:string):string;
65+
function createPatch(fileName: string, oldStr: string, newStr: string, oldHeader: string, newHeader: string, options?: {context: number}): string;
66+
67+
function createTwoFilesPatch(oldFileName: string, newFileName: string, oldStr: string, newStr: string, oldHeader: string, newHeader: string, options?: {context: number}): string;
68+
69+
function structuredPatch(oldFileName: string, newFileName: string, oldStr: string, newStr: string, oldHeader: string, newHeader: string, options?: {context: number}): IUniDiff;
70+
71+
function applyPatch(oldStr: string, uniDiff: string | IUniDiff | IUniDiff[]): string;
72+
73+
function applyPatches(uniDiff: IUniDiff[], options: {
74+
loadFile: (index: number, callback: (err: Error, data: string) => void) => void,
75+
patched: (index: number, content: string) => void,
76+
complete: (err?: Error) => void
77+
}): void;
4978

50-
function applyPatch(oldStr:string, uniDiff:string):string;
79+
function parsePatch(diffStr: string, options?: {strict: boolean}): IUniDiff[];
5180

5281
function convertChangesToXML(changes:IDiffResult[]):string;
5382

typings/findup-sync/findup-sync.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Type definitions for findup-sync v0.3.0
22
// Project: https://github.com/cowboy/node-findup-sync
33
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Nathan Brown <https://github.com/ngbrown>
4-
// Definitions: https://github.com/borisyankov/DefinitelyTyped
4+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
55

66
/// <reference path="../minimatch/minimatch.d.ts" />
77

typings/glob/glob.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Type definitions for Glob 5.0.10
22
// Project: https://github.com/isaacs/node-glob
33
// Definitions by: vvakame <https://github.com/vvakame/>
4-
// Definitions: https://github.com/borisyankov/DefinitelyTyped
4+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
55

66
/// <reference path="../node/node.d.ts" />
77
/// <reference path="../minimatch/minimatch.d.ts" />
@@ -15,7 +15,7 @@ declare module "glob" {
1515
function G(pattern: string, cb: (err: Error, matches: string[]) => void): void;
1616
function G(pattern: string, options: G.IOptions, cb: (err: Error, matches: string[]) => void): void;
1717

18-
module G {
18+
namespace G {
1919
function sync(pattern: string, options?: IOptions): string[];
2020

2121
function hasMagic(pattern: string, options?: IOptions): boolean;

typings/js-yaml/js-yaml.d.ts

+39-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
1-
// Type definitions for js-yaml 3.0.2
1+
// Type definitions for js-yaml 3.5.2
22
// Project: https://github.com/nodeca/js-yaml
3-
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
4-
// Definitions: https://github.com/borisyankov/DefinitelyTyped
3+
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Sebastian Clausen <https://github.com/sclausen>
4+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
55

6-
declare module jsyaml {
6+
declare namespace jsyaml {
77
export function safeLoad(str: string, opts?: LoadOptions): any;
88
export function load(str: string, opts?: LoadOptions): any;
99

10+
export class Type implements TypeConstructorOptions {
11+
constructor(tag: string, opts?: TypeConstructorOptions);
12+
tag: string;
13+
}
14+
export class Schema {
15+
constructor(definition: SchemaDefinition);
16+
public static create(args: any[]): Schema;
17+
}
18+
1019
export function safeLoadAll(str: string, iterator: (doc: any) => void, opts?: LoadOptions): any;
1120
export function loadAll(str: string, iterator: (doc: any) => void, opts?: LoadOptions): any;
1221

1322
export function safeDump(obj: any, opts?: DumpOptions): string;
14-
export function dump(obj: any, opts?: DumpOptions): string
23+
export function dump(obj: any, opts?: DumpOptions): string;
1524

1625
export interface LoadOptions {
1726
// string to be used as a file path in error/warning messages.
@@ -29,12 +38,29 @@ declare module jsyaml {
2938
skipInvalid?: boolean;
3039
// specifies level of nesting, when to switch from block to flow style for collections. -1 means block style everwhere
3140
flowLevel?: number;
32-
// Each tag may have own set of styles. - "tag" => "style" map.
41+
// Each tag may have own set of styles. - "tag" => "style" map.
3342
styles?: Object;
3443
// specifies a schema to use.
3544
schema?: any;
3645
}
3746

47+
export interface TypeConstructorOptions {
48+
kind?: string;
49+
resolve?: Function;
50+
construct?: Function;
51+
instanceOf?: Object;
52+
predicate?: string;
53+
represent?: Function;
54+
defaultStyle?: string;
55+
styleAliases?: Object;
56+
}
57+
58+
export interface SchemaDefinition {
59+
implicit?: any[];
60+
explicit?: any[];
61+
include?: any[];
62+
}
63+
3864
// only strings, arrays and plain objects: http://www.yaml.org/spec/1.2/spec.html#id2802346
3965
export var FAILSAFE_SCHEMA: any;
4066
// only strings, arrays and plain objects: http://www.yaml.org/spec/1.2/spec.html#id2802346
@@ -45,6 +71,13 @@ declare module jsyaml {
4571
export var DEFAULT_SAFE_SCHEMA: any;
4672
// all supported YAML types.
4773
export var DEFAULT_FULL_SCHEMA: any;
74+
export var MINIMAL_SCHEMA: any;
75+
export var SAFE_SCHEMA: any;
76+
77+
export class YAMLException extends Error {
78+
constructor(reason?: any, mark?: any);
79+
toString(compact?: boolean): string;
80+
}
4881
}
4982

5083
declare module 'js-yaml' {

typings/minimatch/minimatch.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
// Type definitions for Minimatch 2.0.8
22
// Project: https://github.com/isaacs/minimatch
33
// Definitions by: vvakame <https://github.com/vvakame/>
4-
// Definitions: https://github.com/borisyankov/DefinitelyTyped
4+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
55

66
declare module "minimatch" {
77

88
function M(target: string, pattern: string, options?: M.IOptions): boolean;
99

10-
module M {
10+
namespace M {
1111
function match(list: string[], pattern: string, options?: IOptions): string[];
1212
function filter(pattern: string, options?: IOptions): (element: string, indexed: number, array: string[]) => boolean;
1313
function makeRe(pattern: string, options?: IOptions): RegExp;
1414

1515
var Minimatch: IMinimatchStatic;
16-
16+
1717
interface IOptions {
1818
debug?: boolean;
1919
nobrace?: boolean;

0 commit comments

Comments
 (0)