Skip to content

Conversation

jakebailey
Copy link
Member

@jakebailey jakebailey commented Oct 3, 2025

@Copilot Copilot AI review requested due to automatic review settings October 3, 2025 22:37
@github-project-automation github-project-automation bot moved this to Not started in PR Backlog Oct 3, 2025
@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Oct 3, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates DOM types for FileSystemDirectoryHandle changes by pulling in changes from the TypeScript-DOM-lib-generator to avoid conflicts with DefinitelyTyped. The main change involves updating type definitions for FileSystem API handles to be more specific about their types and properties.

Key Changes:

  • Updated FileSystemHandle types to use union types (FileSystemDirectoryHandle | FileSystemFileHandle) instead of the base FileSystemHandle type
  • Changed FileSystemHandleKind from enum to string literal union type ("directory" | "file")

Reviewed Changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated no comments.

File Description
tests/baselines/reference/modularizeLibrary_Worker.asynciterable.types Updates baseline test expectations for Worker context FileSystem API types
tests/baselines/reference/modularizeLibrary_Worker.asynciterable.symbols Updates baseline test expectations for Worker context FileSystem API symbols
tests/baselines/reference/modularizeLibrary_Dom.asynciterable.types Updates baseline test expectations for DOM context FileSystem API types
tests/baselines/reference/modularizeLibrary_Dom.asynciterable.symbols Updates baseline test expectations for DOM context FileSystem API symbols

@jakebailey
Copy link
Member Author

@typescript-bot run dt

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 3, 2025

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
run dt ✅ Started 👀 Results

@typescript-bot
Copy link
Collaborator

Hey @jakebailey, the results of running the DT tests are ready.

There were interesting changes:

Errors that changed between main and the branch:

Package: wicg-file-system-access
Main error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/wicg-file-system-access/index.d.ts
  149:9  error  TypeScript@local compile error: 
Subsequent property declarations must have the same type.  Property '[Symbol.asyncIterator]' must be of type '() => FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>', but here has type '{ (): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>; (): AsyncIterableIterator<[string, FileSystemFileHandle | FileSystemDirectoryHandle]>; }'  @definitelytyped/expect

/mnt/vss/_work/1/DefinitelyTyped/types/wicg-file-system-access/wicg-file-system-access-tests.ts
  56:30  error  TypeScript@local compile error: 
Property 'getFile' does not exist on type 'FileSystemHandle'                                                                                                                                                                                                                      @definitelytyped/expect
  58:43  error  TypeScript@local compile error: 
Argument of type 'FileSystemHandle' is not assignable to parameter of type 'FileSystemDirectoryHandle'.
  Type 'FileSystemHandle' is missing the following properties from type 'FileSystemDirectoryHandle': getDirectoryHandle, getFileHandle, removeEntry, resolve, and 7 more  @definitelytyped/expect

✖ 3 problems (3 errors, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.34_typescript@6.0.0-dev.20251003/node_modules/@definitelytyped/dtslint/dist/index.js:199:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.34_typescript@6.0.0-dev.20251003/node_modules/@definitelytyped/dtslint/dist/index.js:191:20)

Branch error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/wicg-file-system-access/index.d.ts
  149:9  error  TypeScript@local compile error: 
Subsequent property declarations must have the same type.  Property '[Symbol.asyncIterator]' must be of type '() => FileSystemDirectoryHandleAsyncIterator<[string, FileSystemFileHandle | FileSystemDirectoryHandle]>', but here has type '{ (): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemFileHandle | FileSystemDirectoryHandle]>; (): AsyncIterableIterator<...>; }'  @definitelytyped/expect

✖ 1 problem (1 error, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.34_typescript@6.0.0-dev.20251003/node_modules/@definitelytyped/dtslint/dist/index.js:199:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.34_typescript@6.0.0-dev.20251003/node_modules/@definitelytyped/dtslint/dist/index.js:191:20)

You can check the log here.

@jakebailey
Copy link
Member Author

Hm, not quite clean. Will double check.

@jakebailey
Copy link
Member Author

Okay, still need one a oneliner: DefinitelyTyped/DefinitelyTyped#73820

@jakebailey
Copy link
Member Author

@typescript-bot run dt

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 3, 2025

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
run dt ✅ Started ✅ Results

@github-project-automation github-project-automation bot moved this from Not started to Needs merge in PR Backlog Oct 3, 2025
@typescript-bot
Copy link
Collaborator

Hey @jakebailey, the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@jakebailey jakebailey merged commit d0d675a into microsoft:main Oct 3, 2025
33 checks passed
@jakebailey jakebailey deleted the dom-update-2025-10-03 branch October 3, 2025 23:36
@github-project-automation github-project-automation bot moved this from Needs merge to Done in PR Backlog Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants