refactor: move WebGPU, FFI and FS typings from unstable to stable (#25488)

Closes #25377
This commit is contained in:
Leo Kettmeir 2024-09-10 05:04:59 -07:00 committed by GitHub
parent 9a169e3cf1
commit c2f97494f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 847 additions and 1375 deletions

View file

@ -2143,7 +2143,7 @@ fn lsp_hover_unstable_always_enabled() {
"version": 1,
// IMPORTANT: If you change this API due to stabilization, also change it
// in the enabled test below.
"text": "type _ = Deno.ForeignLibraryInterface;\n"
"text": "type _ = Deno.DatagramConn;\n"
}
}));
let res = client.write_request(
@ -2161,14 +2161,14 @@ fn lsp_hover_unstable_always_enabled() {
"contents":[
{
"language":"typescript",
"value":"interface Deno.ForeignLibraryInterface"
"value":"interface Deno.DatagramConn"
},
"**UNSTABLE**: New API, yet to be vetted.\n\nA foreign library interface descriptor.",
"\n\n*@category* - FFI \n\n*@experimental*",
"**UNSTABLE**: New API, yet to be vetted.\n\nA generic transport listener for message-oriented protocols.",
"\n\n*@category* - Network \n\n*@experimental*",
],
"range":{
"start":{ "line":0, "character":14 },
"end":{ "line":0, "character":37 }
"end":{ "line":0, "character":26 }
}
})
);
@ -2188,7 +2188,7 @@ fn lsp_hover_unstable_enabled() {
"uri": "file:///a/file.ts",
"languageId": "typescript",
"version": 1,
"text": "type _ = Deno.ForeignLibraryInterface;\n"
"text": "type _ = Deno.DatagramConn;\n"
}
}));
let res = client.write_request(
@ -2206,14 +2206,14 @@ fn lsp_hover_unstable_enabled() {
"contents":[
{
"language":"typescript",
"value":"interface Deno.ForeignLibraryInterface"
"value":"interface Deno.DatagramConn"
},
"**UNSTABLE**: New API, yet to be vetted.\n\nA foreign library interface descriptor.",
"\n\n*@category* - FFI \n\n*@experimental*",
"**UNSTABLE**: New API, yet to be vetted.\n\nA generic transport listener for message-oriented protocols.",
"\n\n*@category* - Network \n\n*@experimental*",
],
"range":{
"start":{ "line":0, "character":14 },
"end":{ "line":0, "character":37 }
"end":{ "line":0, "character":26 }
}
})
);

View file

@ -1,10 +1,5 @@
Check file:///[WILDLINE]main.ts
error: TS2551 [ERROR]: Property 'dlopen' does not exist on type 'typeof Deno'. Did you mean 'open'? 'Deno.dlopen' is an unstable API. Did you mean 'open'? If not, try changing the 'lib' compiler option to include 'deno.unstable' or add a triple-slash directive to the top of your entrypoint (main file): /// <reference lib="deno.unstable" />
Deno.dlopen("path/to/lib", {});
~~~~~~
error: TS2339 [ERROR]: Property 'listenDatagram' does not exist on type 'typeof Deno'. 'Deno.listenDatagram' is an unstable API. If not, try changing the 'lib' compiler option to include 'deno.unstable' or add a triple-slash directive to the top of your entrypoint (main file): /// <reference lib="deno.unstable" />
Deno.listenDatagram({
~~~~~~~~~~~~~~
at file:///[WILDLINE]/main.ts:5:6
'open' is declared here.
export function open(
~~~~
at asset:///lib.deno.ns.d.ts:[WILDLINE]

View file

@ -2,4 +2,7 @@
/// <reference lib="deno.ns" />
// unstable apis removed here, so should error
Deno.dlopen("path/to/lib", {});
Deno.listenDatagram({
port: 3000,
transport: "udp",
});