denoland / deno_bindgen

Write high-level Deno FFI libraries in Rust.
MIT License
275 stars 28 forks source link

Add // @ts-ignore above UnsafePointerView #62

Closed felipetesc closed 2 years ago

felipetesc commented 2 years ago

Hi, I wanted to know if it is possible to automatically add // @ts-ignore above UnsafePointerView to prevent VSCode and other editors to show: Property 'UnsafePointerView' does not exist on type 'typeof Deno'.deno-ts(2339): Like this:

// @ts-ignore
  const ptr = new Deno.UnsafePointerView(v as Deno.UnsafePointer)

At least until the API can be stabilized. By the way, really nice job. Already tested winit. Thanks.

littledivy commented 2 years ago

Deno.UnsafePointerView is behind the --unstable flag. Have you enabled deno.unstable in vscode? Like so:

.vscode/settings.json:

{
  "deno.enable": true,
  "deno.unstable": true
}