Skip to content

Commit

Permalink
Rename option.signal to option.abortSignal
Browse files Browse the repository at this point in the history
  • Loading branch information
Borewit committed Sep 8, 2024
1 parent 8f4ece5 commit 959de9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ export function fileTypeStream(webStream: AnyWebReadableStream<Uint8Array>, opti
export declare class FileTypeParser {
detectors: Iterable<Detector>;

constructor(options?: {customDetectors?: Iterable<Detector>; abortSignal: AbortSignal});
constructor(options?: {customDetectors?: Iterable<Detector>; signal: AbortSignal});

/**
Works the same way as {@link fileTypeFromBuffer}, additionally taking into account custom detectors (if any were provided to the constructor).
Expand Down
2 changes: 1 addition & 1 deletion core.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class FileTypeParser {
constructor(options) {
this.detectors = options?.customDetectors;
this.tokenizerOptions = {
abortSignal: options?.abortSignal,
abortSignal: options?.signal,
};
this.fromTokenizer = this.fromTokenizer.bind(this);
this.fromBuffer = this.fromBuffer.bind(this);
Expand Down

0 comments on commit 959de9c

Please sign in to comment.