Typedef fixes#16
Open
kookster wants to merge 5 commits intofeat/node_24_and_related_upgradesfrom
Open
Conversation
The parameter was named 'samples' but should be 'sampleRate' to match the actual implementation in wavefile-converter.js.
Replace generic 'object' types with specific interfaces for: fact, cue, smpl, bext, mext, cart, iXML, ds64, LIST, junk, _PMX chunks. Also adds sub-types for cue points, smpl loops, and cart post timers. Adds MPEG fields (headLayer, headBitRate, etc.) to the fmt chunk type.
…uePoint - listTags() now returns Record<string, string> instead of object - listCuePoints() now returns CuePointOutput[] with all 15 fields typed - setCuePoint() now accepts CuePointInput with required position and optional label, end, and region attributes
The package now uses "type": "module" with ESM exports, so the type definitions should use 'export class' and 'export type' instead of 'export = wavefile' with 'declare namespace'. All types are now individually exported so consumers can import them directly.
Consumers using default imports (e.g. import wavefile from 'prx-wavefile')
will continue to work alongside named imports (import { WaveFile }).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I saw some other PRs for typedefs that weren't right and the typedefs for cart chunk and related other chunks were pretty vague, so this fixes those issues, and the export style - this obviously builds off PR #14 :
Bug:
Chunk types are all object — these should have proper interfaces:
Missing from fmt type:
Return types too vague:
Missing method:
Export style: