Skip to content

Commit 0b3a9cc

Browse files
author
Paul van Brenk
committed
Add the 'debug' typings to the Express templates.
1 parent 392b961 commit 0b3a9cc

File tree

9 files changed

+114
-6
lines changed

9 files changed

+114
-6
lines changed

Nodejs/Product/Nodejs/Nodejs.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,11 +1061,13 @@
10611061
<TypeScriptProject Include="ProjectTemplates\TypeScriptExpressApp\serve-static.typings.json" />
10621062
<TypeScriptProject Include="ProjectTemplates\TypeScriptExpressApp\typings.json" />
10631063
<TypeScriptProject Include="ProjectTemplates\TypeScriptExpressApp\mine.typings.json" />
1064+
<TypeScriptProject Include="ProjectTemplates\TypeScriptExpressApp\debug.typings.json" />
10641065
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\express-serve-static-core.typings.json" />
10651066
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\express.typings.json" />
10661067
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\serve-static.typings.json" />
10671068
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\mine.typings.json" />
10681069
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\typings.json" />
1070+
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\debug.typings.json" />
10691071
<ZipItem Include="Templates\Files\EmptyJson\EmptyJson.json" />
10701072
<ZipItem Include="Templates\Files\EmptyLess\EmptyLess.less" />
10711073
<ZipItem Include="Templates\Files\EmptyPug\EmptyPug.pug" />
@@ -1470,6 +1472,10 @@
14701472
<ItemGroup>
14711473
<ZipItem Include="Templates\Files\EmptyTs\EmptyTs.ts" />
14721474
</ItemGroup>
1475+
<ItemGroup>
1476+
<TypeScriptProject Include="ProjectTemplates\TypeScriptAzureExpressApp\debug.d.ts" />
1477+
<TypeScriptProject Include="ProjectTemplates\TypeScriptExpressApp\debug.d.ts" />
1478+
</ItemGroup>
14731479
<PropertyGroup>
14741480
<!--
14751481
To specify a different registry root to register your package, uncomment the TargetRegistryRoot

Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureExpressApp/TypeScriptExpressApp.vstemplate

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@
4949
<ProjectItem TargetFileName="index.d.ts">serve-static.d.ts</ProjectItem>
5050
<ProjectItem TargetFileName="typings.json">serve-static.typings.json</ProjectItem>
5151
</Folder>
52+
<Folder Name="debug">
53+
<ProjectItem TargetFileName="index.d.ts">debug.d.ts</ProjectItem>
54+
<ProjectItem TargetFileName="typings.json">debug.typings.json</ProjectItem>
55+
</Folder>
5256
</Folder>
5357
</Folder>
5458
<ProjectItem OpenInEditor="true">app.ts</ProjectItem>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Generated by typings
2+
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/debug/debug.d.ts
3+
declare var debug: debug.IDebug;
4+
5+
// Support AMD require
6+
declare module 'debug' {
7+
export = debug;
8+
}
9+
10+
declare namespace debug {
11+
export interface IDebug {
12+
(namespace: string): debug.IDebugger,
13+
coerce: (val: any) => any,
14+
disable: () => void,
15+
enable: (namespaces: string) => void,
16+
enabled: (namespaces: string) => boolean,
17+
18+
names: string[],
19+
skips: string[],
20+
21+
formatters: IFormatters
22+
}
23+
24+
export interface IFormatters {
25+
[formatter: string]: Function
26+
}
27+
28+
export interface IDebugger {
29+
(formatter: any, ...args: any[]): void;
30+
31+
enabled: boolean;
32+
log: Function;
33+
namespace: string;
34+
}
35+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"resolution": "main",
3+
"tree": {
4+
"src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/debug/debug.d.ts",
5+
"raw": "registry:dt/debug#0.0.0+20160317120654",
6+
"typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/debug/debug.d.ts"
7+
}
8+
}
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
{
2-
"dependencies": {},
32
"globalDependencies": {
4-
"express": "registry:dt/express#4.0.0+20160708185218",
5-
"express-serve-static-core": "registry:dt/express-serve-static-core#4.0.0+20160829034835",
3+
"body-parser": "registry:dt/body-parser#0.0.0+20160317120654",
4+
"cookie-parser": "registry:dt/cookie-parser#1.3.4+20160316155526",
5+
"debug": "registry:dt/debug#0.0.0+20160317120654",
6+
"express": "registry:dt/express#4.0.0+20160317120654",
7+
"express-serve-static-core": "registry:dt/express-serve-static-core#0.0.0+20160602151406",
68
"mime": "registry:dt/mime#0.0.0+20160316155526",
9+
"morgan": "registry:dt/morgan#1.7.0+20160524142355",
10+
"serve-favicon": "registry:dt/serve-favicon#0.0.0+20160316155526",
711
"serve-static": "registry:dt/serve-static#0.0.0+20160606155157"
812
}
913
}

Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptExpressApp/ExpressApp.vstemplate

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@
4949
<ProjectItem TargetFileName="index.d.ts">serve-static.d.ts</ProjectItem>
5050
<ProjectItem TargetFileName="typings.json">serve-static.typings.json</ProjectItem>
5151
</Folder>
52+
<Folder Name="debug">
53+
<ProjectItem TargetFileName="index.d.ts">debug.d.ts</ProjectItem>
54+
<ProjectItem TargetFileName="typings.json">debug.typings.json</ProjectItem>
55+
</Folder>
5256
</Folder>
5357
</Folder>
5458
<ProjectItem OpenInEditor="true">app.ts</ProjectItem>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Generated by typings
2+
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/debug/debug.d.ts
3+
declare var debug: debug.IDebug;
4+
5+
// Support AMD require
6+
declare module 'debug' {
7+
export = debug;
8+
}
9+
10+
declare namespace debug {
11+
export interface IDebug {
12+
(namespace: string): debug.IDebugger,
13+
coerce: (val: any) => any,
14+
disable: () => void,
15+
enable: (namespaces: string) => void,
16+
enabled: (namespaces: string) => boolean,
17+
18+
names: string[],
19+
skips: string[],
20+
21+
formatters: IFormatters
22+
}
23+
24+
export interface IFormatters {
25+
[formatter: string]: Function
26+
}
27+
28+
export interface IDebugger {
29+
(formatter: any, ...args: any[]): void;
30+
31+
enabled: boolean;
32+
log: Function;
33+
namespace: string;
34+
}
35+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"resolution": "main",
3+
"tree": {
4+
"src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/debug/debug.d.ts",
5+
"raw": "registry:dt/debug#0.0.0+20160317120654",
6+
"typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/debug/debug.d.ts"
7+
}
8+
}
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
{
2-
"dependencies": {},
32
"globalDependencies": {
4-
"express": "registry:dt/express#4.0.0+20160708185218",
5-
"express-serve-static-core": "registry:dt/express-serve-static-core#4.0.0+20160829034835",
3+
"body-parser": "registry:dt/body-parser#0.0.0+20160317120654",
4+
"cookie-parser": "registry:dt/cookie-parser#1.3.4+20160316155526",
5+
"debug": "registry:dt/debug#0.0.0+20160317120654",
6+
"express": "registry:dt/express#4.0.0+20160317120654",
7+
"express-serve-static-core": "registry:dt/express-serve-static-core#0.0.0+20160602151406",
68
"mime": "registry:dt/mime#0.0.0+20160316155526",
9+
"morgan": "registry:dt/morgan#1.7.0+20160524142355",
10+
"serve-favicon": "registry:dt/serve-favicon#0.0.0+20160316155526",
711
"serve-static": "registry:dt/serve-static#0.0.0+20160606155157"
812
}
913
}

0 commit comments

Comments
 (0)