Skip to content

Commit 652a3b4

Browse files
committed
Add VoidFunction interface to es5 for Node.js support
1 parent 1c4083f commit 652a3b4

File tree

4 files changed

+60
-0
lines changed

4 files changed

+60
-0
lines changed

src/lib/es5.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,10 @@ interface Function {
288288
caller: Function;
289289
}
290290

291+
interface VoidFunction {
292+
(): void;
293+
}
294+
291295
interface FunctionConstructor {
292296
/**
293297
* Creates a new function.

tests/baselines/reference/completionsCommitCharactersGlobal.baseline

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2756,6 +2756,7 @@
27562756
// | var URIError: URIErrorConstructor
27572757
// | interface URIErrorConstructor
27582758
// | void
2759+
// | interface VoidFunction
27592760
// | type WeakKey = object
27602761
// | interface WeakKeyTypes
27612762
// | interface ImportAssertions
@@ -2936,6 +2937,7 @@
29362937
// | var URIError: URIErrorConstructor
29372938
// | interface URIErrorConstructor
29382939
// | void
2940+
// | interface VoidFunction
29392941
// | type WeakKey = object
29402942
// | interface WeakKeyTypes
29412943
// | interface ImportAssertions
@@ -83541,6 +83543,27 @@
8354183543
}
8354283544
]
8354383545
},
83546+
{
83547+
"name": "VoidFunction",
83548+
"kind": "interface",
83549+
"kindModifiers": "declare",
83550+
"sortText": "15",
83551+
"displayParts": [
83552+
{
83553+
"text": "interface",
83554+
"kind": "keyword"
83555+
},
83556+
{
83557+
"text": " ",
83558+
"kind": "space"
83559+
},
83560+
{
83561+
"text": "VoidFunction",
83562+
"kind": "interfaceName"
83563+
}
83564+
],
83565+
"documentation": []
83566+
},
8354483567
{
8354583568
"name": "WeakKey",
8354683569
"kind": "type",
@@ -93012,6 +93035,27 @@
9301293035
}
9301393036
]
9301493037
},
93038+
{
93039+
"name": "VoidFunction",
93040+
"kind": "interface",
93041+
"kindModifiers": "declare",
93042+
"sortText": "15",
93043+
"displayParts": [
93044+
{
93045+
"text": "interface",
93046+
"kind": "keyword"
93047+
},
93048+
{
93049+
"text": " ",
93050+
"kind": "space"
93051+
},
93052+
{
93053+
"text": "VoidFunction",
93054+
"kind": "interfaceName"
93055+
}
93056+
],
93057+
"documentation": []
93058+
},
9301593059
{
9301693060
"name": "WeakKey",
9301793061
"kind": "type",

tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_namespaceSameNameAsIntrinsic.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,6 +1294,12 @@ Info seq [hh:mm:ss:mss] response:
12941294
"kindModifiers": "",
12951295
"sortText": "15"
12961296
},
1297+
{
1298+
"name": "VoidFunction",
1299+
"kind": "interface",
1300+
"kindModifiers": "declare",
1301+
"sortText": "15"
1302+
},
12971303
{
12981304
"name": "WeakKey",
12991305
"kind": "type",

tests/baselines/reference/tsserver/fourslashServer/pasteEdits_revertUpdatedFile.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,6 +1246,12 @@ Info seq [hh:mm:ss:mss] response:
12461246
"kindModifiers": "",
12471247
"sortText": "15"
12481248
},
1249+
{
1250+
"name": "VoidFunction",
1251+
"kind": "interface",
1252+
"kindModifiers": "declare",
1253+
"sortText": "15"
1254+
},
12491255
{
12501256
"name": "WeakKey",
12511257
"kind": "type",

0 commit comments

Comments
 (0)