mark the ImportAssertions as deprecated (#57012)

This commit is contained in:
Oleksandr T
2024-01-18 02:27:12 +02:00
committed by GitHub
parent 744f77a5fa
commit 5364494473
3 changed files with 14 additions and 7 deletions

View File

@@ -1043,6 +1043,12 @@ export namespace Completion {
kindModifiers: "declare",
sortText: SortText.GlobalsOrKeywords,
});
const deprecatedInterfaceEntry = (name: string): ExpectedCompletionEntryObject => ({
name,
kind: "interface",
kindModifiers: "deprecated,declare",
sortText: "z15" as SortText,
});
const typeEntry = (name: string): ExpectedCompletionEntryObject => ({
name,
kind: "type",
@@ -1128,7 +1134,7 @@ export namespace Completion {
interfaceEntry("TemplateStringsArray"),
interfaceEntry("ImportMeta"),
interfaceEntry("ImportCallOptions"),
interfaceEntry("ImportAssertions"),
deprecatedInterfaceEntry("ImportAssertions"),
interfaceEntry("ImportAttributes"),
varEntry("Math"),
varEntry("Date"),

1
src/lib/es5.d.ts vendored
View File

@@ -626,6 +626,7 @@ interface ImportCallOptions {
/**
* The type for the `assert` property of the optional second argument to `import()`.
* @deprecated
*/
interface ImportAssertions {
[key: string]: string;

View File

@@ -584,12 +584,6 @@ Info seq [hh:mm:ss:mss] response:
"kindModifiers": "declare",
"sortText": "15"
},
{
"name": "ImportAssertions",
"kind": "interface",
"kindModifiers": "declare",
"sortText": "15"
},
{
"name": "ImportAttributes",
"kind": "interface",
@@ -1161,6 +1155,12 @@ Info seq [hh:mm:ss:mss] response:
"fileName": "/node_modules/fp-ts/index.d.ts",
"isPackageJsonImport": true
}
},
{
"name": "ImportAssertions",
"kind": "interface",
"kindModifiers": "deprecated,declare",
"sortText": "z15"
}
]
}