chore: add DOM.AsyncIterable lib and use standard filesystem types
Add `DOM.AsyncIterable` to the shared TypeScript configuration in `@backstage/cli`, making standard async iteration methods available on DOM APIs like `FileSystemDirectoryHandle`. This aligns behavior with TypeScript 6.0, where this lib is included in `DOM` by default. With the async iterable types now available, replace the custom `IterableDirectoryHandle` and `WritableFileHandle` types in the scaffolder plugin with the standard `FileSystemDirectoryHandle` and `FileSystemFileHandle` DOM types. Add type guard functions for `FileSystemHandle` since it is not a discriminated union. Signed-off-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Added `DOM.AsyncIterable` to the default `lib` in the shared TypeScript configuration, enabling standard async iteration support for DOM APIs such as `FileSystemDirectoryHandle`. This aligns behavior with [TypeScript 6.0](https://devblogs.microsoft.com/typescript/announcing-typescript-6-0/#the-dom-lib-now-contains-domiterable-and-domasynciterable), where this lib is included in `DOM` by default.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
---
|
||||
|
||||
Removed custom `IterableDirectoryHandle` and `WritableFileHandle` types in favor of the standard DOM `FileSystemDirectoryHandle` and `FileSystemFileHandle` types, which are now available through the `DOM.AsyncIterable` lib added to the shared TypeScript configuration.
|
||||
Reference in New Issue
Block a user