gathered from notes in https://github.com/denoland/deno/pull/4882
Hint: Ops are made unstable using State::check_unstable (example)
Deno.Buffer.toString() should be removed (#4992)// Defaults to falseexport function test(fn: () => void | Promise<void>): void; (#4951)ReadCloser with Reader & Closer (#4944)interface Stdin with Reader & SyncReader & Closer & { rid: number } (also stdout, stderr) (#4952)address renamed to path (#4959)| { success: false; signal: number; } (#4966)Deno.FileInfo isFile, isDirectory, isSymlink should be getter methods to match node's api https://nodejs.org/api/fs.html#fs_class_fs_stats #4932
-1. They are simple constants just like everything else in FileInfo. If the problem is that these values need to agree with each other, we should just model it properly with
interface FileInfo {
type: "file" | "directory" | "symlink";
// ...
}
For things like import maps, isn't it should be experimental rather than unstable?
Could there be a specific flag to opt in to a specific experimental feature, in this case import maps, rather than --unstable which would opt me in to all unstable APIs?
Edited: The original --importmap has already implied an intention to opt in this feature.
@shian15810 lets move the discussion over to #4958, so we don't overload this issue.
Thanks for the help everyone, we completed the API changes. We are tentatively API stable now.
I know 1.0 is coming very soon, but was there any consideration on @nayeemrmn's idea of using
type: "file" | "directory" | "symlink"
instead of the current multiple field method? It's much more ergonomic and works nicely with typescript's discrimination testing (like filtering for items with specific names and types). Since isFile, isDirectory and isSymlink are mutually exclusive, it makes much more sense in terms of typing to do this (the current fields look, at a glance, that they might not but mutually exclusive).
Most helpful comment
-1. They are simple constants just like everything else in
FileInfo. If the problem is that these values need to agree with each other, we should just model it properly with