Skip to content

Commit

Permalink
fix: Fix the wrong type of stringify() (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuu authored Apr 21, 2024
1 parent 9550d10 commit daced67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion stringify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ function buildParts(lines: LineArray, parts: PartialSegment[]) {
return hint;
}

function stringify(playlist: MasterPlaylist | MediaPlaylist, postProcess: PostProcess | undefined): string {
function stringify(playlist: MasterPlaylist | MediaPlaylist, postProcess?: PostProcess): string {
utils.PARAMCHECK(playlist);
utils.ASSERT('Not a playlist', playlist.type === 'playlist');
const lines = new LineArray(playlist.uri);
Expand Down
4 changes: 2 additions & 2 deletions types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,6 @@ export type TagParam =
export type UserAttribute = number | string | Uint8Array;

export type PostProcess = {
segmentProcessor: ((lines: string[], start: number, end: number, segment: Segment, i: number) => undefined) | undefined;
variantProcessor: ((lines: string[], start: number, end: number, variant: Variant, i: number) => undefined) | undefined;
segmentProcessor: ((lines: string[], start: number, end: number, segment: Segment, i: number) => void) | undefined;
variantProcessor: ((lines: string[], start: number, end: number, variant: Variant, i: number) => void) | undefined;
};

0 comments on commit daced67

Please sign in to comment.