Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tsc/internal/bundled/libs/lib.dom.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14439,7 +14439,7 @@ interface File extends Blob {

declare var File: {
prototype: File;
new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
new(fileBits: Iterable<BlobPart>, fileName: string, options?: FilePropertyBag): File;
};

/**
Expand Down
2 changes: 1 addition & 1 deletion tsc/internal/bundled/libs/lib.webworker.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4680,7 +4680,7 @@ interface File extends Blob {

declare var File: {
prototype: File;
new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
new(fileBits: Iterable<BlobPart>, fileName: string, options?: FilePropertyBag): File;
};

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//// [tests/cases/compiler/fileConstructorIterableFileBits.ts] ////

=== fileConstructorIterableFileBits.ts ===
new File((function* () {
>File : Symbol(File, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))

yield "a";
})(), "name");

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//// [tests/cases/compiler/fileConstructorIterableFileBits.ts] ////

=== fileConstructorIterableFileBits.ts ===
new File((function* () {
>new File((function* () { yield "a";})(), "name") : File
>File : { new (fileBits: Iterable<BlobPart>, fileName: string, options?: FilePropertyBag): File; prototype: File; }
>(function* () { yield "a";})() : Generator<string, void, any>
>(function* () { yield "a";}) : () => Generator<string, void, any>
>function* () { yield "a";} : () => Generator<string, void, any>

yield "a";
>yield "a" : any
>"a" : "a"

})(), "name");
>"name" : "name"

2 changes: 1 addition & 1 deletion tsc/testdata/fixtures/lib/dom.generated.d.ts

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

it's already not workable that we touch the generated files, but these are test fixtures that definitely should not be edited either

Original file line number Diff line number Diff line change
Expand Up @@ -14423,7 +14423,7 @@ interface File extends Blob {

declare var File: {
prototype: File;
new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
new(fileBits: Iterable<BlobPart>, fileName: string, options?: FilePropertyBag): File;
};

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// @target: es2022
// @lib: es2022,dom
// @noEmit: true

new File((function* () {
yield "a";
})(), "name");