Repository navigation
Fix every type error in test/
#44614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c59a61c
0581fb7
21aa092
2eb92db
fa07866
be54155
457443d
af27923
f9c9530
df72770
37c653b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -152,6 +152,10 @@ declare var ReadableStream: Bun.__internal.UseLibDomIfAvailable< | |
| prototype: ReadableStream; | ||
| new <R = any>(underlyingSource?: Bun.UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>; | ||
| new <R = any>(underlyingSource?: Bun.DirectUnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>; | ||
| new <R extends Uint8Array = Uint8Array<ArrayBuffer>>( | ||
| underlyingSource: import("node:stream/web").UnderlyingByteSource, | ||
| strategy?: { highWaterMark?: number }, | ||
| ): ReadableStream<R>; | ||
| } | ||
| >; | ||
|
|
||
|
|
@@ -1502,6 +1506,16 @@ interface Blob { | |
| */ | ||
| readonly type: string; | ||
|
|
||
| /** | ||
| * Returns a new `Blob` with the bytes from `start` up to but not including | ||
| * `end`. Negative indices count from the end. | ||
| * | ||
| * @param start byte offset to start at. Defaults to 0. | ||
| * @param end byte offset to stop at. Defaults to `size`. | ||
| * @param contentType the `type` of the new `Blob`. | ||
| */ | ||
| slice(start?: number, end?: number, contentType?: string): Blob; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 nit (optional): Users without lib.dom who call Why this was flaggedA bun-types consumer without lib.dom writes Verification: nit — triggers when a bun-types consumer without lib.dom calls
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried it, and it breaks more than it fixes. With That is |
||
|
|
||
| /** | ||
| * Read the data from the blob as a JSON object. | ||
| * | ||
|
|
@@ -1822,7 +1836,10 @@ declare var ReadableStreamBYOBRequest: Bun.__internal.UseLibDomIfAvailable< | |
| interface TextDecoderStream extends Bun.__internal.LibEmptyOrNodeStreamWebTextDecoderStream {} | ||
| declare var TextDecoderStream: Bun.__internal.UseLibDomIfAvailable< | ||
| "TextDecoderStream", | ||
| { prototype: TextDecoderStream; new (): TextDecoderStream } | ||
| { | ||
| prototype: TextDecoderStream; | ||
| new (encoding?: Bun.Encoding, options?: { fatal?: boolean; ignoreBOM?: boolean }): TextDecoderStream; | ||
| } | ||
| >; | ||
|
|
||
| interface TextEncoderStream extends Bun.__internal.LibEmptyOrNodeStreamWebTextEncoderStream {} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| // Files that tests import for their path (the "file" loader) or their text (`with { type: "text" }`). | ||
| // TypeScript 7.1 can declare these by import attribute instead of by extension, see packages/bun-types/ts7.1. | ||
| declare module "*.c" { | ||
| var contents: string; | ||
| export = contents; | ||
| } | ||
| declare module "*.cc" { | ||
| var contents: string; | ||
| export = contents; | ||
| } | ||
| declare module "*.h" { | ||
| var contents: string; | ||
| export = contents; | ||
| } | ||
| declare module "*.pem" { | ||
| var contents: string; | ||
| export = contents; | ||
| } | ||
| declare module "*.br" { | ||
| var contents: string; | ||
| export = contents; | ||
| } | ||
| declare module "*.gzip" { | ||
| var contents: string; | ||
| export = contents; | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.