Skip to content

Commit

Permalink
Update core.d.ts
Browse files Browse the repository at this point in the history
Use hash for class method member reference.
Simplify code comments.

Co-authored-by: Sindre Sorhus <[email protected]>
  • Loading branch information
Borewit and sindresorhus committed Dec 18, 2024
1 parent 64442f9 commit e59f6a0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions core.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ console.log(await fileTypeFromBlob(blob));
export declare function fileTypeFromBlob(blob: Blob): Promise<FileTypeResult | undefined>;

/**
A custom detector is a function that allows specifying custom detection mechanisms.
A custom file type detector.
An array of detectors can be provided via the `fileTypeOptions` argument for the `FileTypeParser` constructor.
In Node.js, you should use `NodeFileTypeParser`, which extends `FileTypeParser` and provides access to Node.js specific functions.
Detectors can be added via the constructor options, or by adding it directly to `FileTypeParser.detectors`.
Detectors can be added via the constructor options, or by adding it directly to `FileTypeParser#detectors`.
The detectors provided via the constructor options, are called before the default detectors are called.
Expand Down Expand Up @@ -184,8 +184,9 @@ export function fileTypeStream(webStream: AnyWebReadableStream<Uint8Array>, opti

export declare class FileTypeParser {
/**
File-type detectors, initialized with a single entry holding the build in detector function.
The array is used to iterate over all detectors, as long as the function returns `undefined`.
File type detectors.

Check failure on line 188 in core.d.ts

View workflow job for this annotation

GitHub Actions / Node.js 22

Trailing spaces not allowed.

Check failure on line 188 in core.d.ts

View workflow job for this annotation

GitHub Actions / Node.js 20

Trailing spaces not allowed.

Check failure on line 188 in core.d.ts

View workflow job for this annotation

GitHub Actions / Node.js 18

Trailing spaces not allowed.

Check failure on line 188 in core.d.ts

View workflow job for this annotation

GitHub Actions / Node.js 22

Trailing spaces not allowed.

Check failure on line 188 in core.d.ts

View workflow job for this annotation

GitHub Actions / Node.js 20

Trailing spaces not allowed.

Check failure on line 188 in core.d.ts

View workflow job for this annotation

GitHub Actions / Node.js 18

Trailing spaces not allowed.
Initialized with a single entry holding the built-in detector function.
*/
detectors: Detector[];

Expand Down

0 comments on commit e59f6a0

Please sign in to comment.