Closed Boring-App closed 7 months ago
This looks like a typescript parameter typing level error not the lib error. stc() is not a constructor / type defined by the library.
https://github.com/DefinitelyTyped/DefinitelyTyped/commit/f5f0186a59949fbc5caecd32e1ca85465f6838c0
This is the commit that fixes the issue.
@m1tk4
Thanks @SamuelCBlum , good to know. Typedef seems a bit restrictive - in reality smpte-timecode would take numbers like 240 and 120, but [240,1] would be workarounds.
Hi - referencing this issue, as I believe it is not yet resolved. https://github.com/CrystalComputerCorp/smpte-timecode/issues/40
The issue is that we are using typescript, and we cannot simply add the framerate as a Number[].
If we try:
var test = new stc(900, [240000, 1001], true);
We get the error below.
test_timecode.ts:59:40 - error TS2345: Argument of type 'number[]' is not assignable to parameter of type 'FRAMERATE | undefined'.
59 var nineHundredFrames = new stc(900, [240000, 1001], true);