@imferno/wasm 3.0.2-beta.5af77ef → 3.0.2-beta.67b6b7d

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/imferno_wasm.d.ts CHANGED
@@ -1,481 +1,5 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- export interface Asset {
4
- id: ImfUuid;
5
- packingList: boolean | null;
6
- chunkList: ChunkList;
7
- }
8
-
9
- export interface AssetList {
10
- assets: Asset[];
11
- }
12
-
13
- export interface AssetMap {
14
- id: ImfUuid;
15
- annotationText: string | null;
16
- creator: string | null;
17
- volumeCount: number;
18
- issueDate: string;
19
- issuer: string | null;
20
- assetList: AssetList;
21
- }
22
-
23
- export interface AudienceElement {
24
- @scope?: string | null;
25
- $text?: string | null;
26
- }
27
-
28
- export interface AudioSubDescriptors {
29
- SoundfieldGroupLabelSubDescriptor?: SoundfieldGroupLabelSubDescriptor | null;
30
- }
31
-
32
- export interface CDCIDescriptor {
33
- InstanceUID?: string | null;
34
- StoredWidth?: number | null;
35
- StoredHeight?: number | null;
36
- DisplayWidth?: number | null;
37
- DisplayHeight?: number | null;
38
- ActiveWidth?: number | null;
39
- ActiveHeight?: number | null;
40
- SampleRate?: EditRate | null;
41
- ImageAspectRatio?: string | null;
42
- ColorPrimaries?: ColorPrimaries | null;
43
- TransferCharacteristic?: TransferCharacteristic | null;
44
- CodingEquations?: CodingEquations | null;
45
- PictureCompression?: VideoCodec | null;
46
- ComponentDepth?: number | null;
47
- FrameLayout?: string | null;
48
- DisplayF2Offset?: number | null;
49
- HorizontalSubsampling?: number | null;
50
- VerticalSubsampling?: number | null;
51
- ColorSiting?: number | null;
52
- BlackRefLevel?: number | null;
53
- WhiteRefLevel?: number | null;
54
- ColorRange?: number | null;
55
- StoredF2Offset?: number | null;
56
- SampledWidth?: number | null;
57
- SampledHeight?: number | null;
58
- SampledXOffset?: number | null;
59
- SampledYOffset?: number | null;
60
- AlphaTransparency?: string | null;
61
- ImageAlignmentOffset?: number | null;
62
- ImageStartOffset?: number | null;
63
- ImageEndOffset?: number | null;
64
- FieldDominance?: number | null;
65
- ReversedByteOrder?: string | null;
66
- PaddingBits?: number | null;
67
- AlphaSampleDepth?: number | null;
68
- LinkedTrackID?: number | null;
69
- SubDescriptors?: VideoSubDescriptors | null;
70
- }
71
-
72
- export interface Chunk {
73
- path: string;
74
- volumeIndex: number;
75
- }
76
-
77
- export interface ChunkList {
78
- chunks: Chunk[];
79
- }
80
-
81
- export interface CompositionPlaylist {
82
- id: ImfUuid;
83
- annotation?: LanguageString | null;
84
- issueDate: string;
85
- issuer?: LanguageString | null;
86
- creator?: LanguageString | null;
87
- contentOriginator?: LanguageString | null;
88
- contentTitle: LanguageString;
89
- contentKind?: ContentKindElement;
90
- contentVersionList?: ContentVersionList | null;
91
- essenceDescriptorList?: EssenceDescriptorList | null;
92
- editRate?: EditRate | null;
93
- totalRunningTime?: string | null;
94
- localeList?: LocaleList | null;
95
- extensionProperties?: ExtensionProperties | null;
96
- compositionTimecode?: CompositionTimecode | null;
97
- segmentList: SegmentList;
98
- }
99
-
100
- export interface CompositionTimecode {
101
- timecodeDropFrame: boolean | null;
102
- timecodeRate: number | null;
103
- timecodeStartAddress: string | null;
104
- }
105
-
106
- export interface ContainerConstraintsSubDescriptor {
107
- InstanceID?: string | null;
108
- }
109
-
110
- export interface ContentKindElement {
111
- kind: ContentKind;
112
- scope: string | null;
113
- }
114
-
115
- export interface ContentMaturityRating {
116
- agency: string;
117
- rating?: string | null;
118
- audience?: AudienceElement | null;
119
- }
120
-
121
- export interface ContentMaturityRatingList {
122
- contentMaturityRatings: ContentMaturityRating[];
123
- }
124
-
125
- export interface ContentVersion {
126
- id: string;
127
- labelText?: LanguageString | null;
128
- }
129
-
130
- export interface ContentVersionList {
131
- contentVersions: ContentVersion[];
132
- }
133
-
134
- export interface DCTimedTextDescriptor {
135
- InstanceID?: string | null;
136
- LinkedTrackID?: number | null;
137
- SampleRate?: EditRate | null;
138
- RFC5646LanguageTagList?: LanguageTag[];
139
- NamespaceURI?: string | null;
140
- }
141
-
142
- export interface EditRate {
143
- numerator: number;
144
- denominator: number;
145
- }
146
-
147
- export interface EssenceDescriptor {
148
- id: ImfUuid;
149
- rgbaDescriptor?: RGBADescriptor | null;
150
- cdciDescriptor?: CDCIDescriptor | null;
151
- wavePCMDescriptor?: WAVEPCMDescriptor | null;
152
- dcTimedTextDescriptor?: DCTimedTextDescriptor | null;
153
- iabEssenceDescriptor?: IABEssenceDescriptor | null;
154
- isxdDataEssenceDescriptor?: ISXDDataEssenceDescriptor | null;
155
- }
156
-
157
- export interface EssenceDescriptorList {
158
- essenceDescriptors: EssenceDescriptor[];
159
- }
160
-
161
- export interface ExtensionProperties {
162
- applicationIdentification?: string | null;
163
- maxCLL?: number | null;
164
- maxFALL?: number | null;
165
- }
166
-
167
- export interface ForcedNarrativeSequence {
168
- id: ImfUuid;
169
- trackId: ImfUuid;
170
- resourceList: ResourceList;
171
- }
172
-
173
- export interface HearingImpairedCaptionsSequence {
174
- id: ImfUuid;
175
- trackId: ImfUuid;
176
- resourceList: ResourceList;
177
- }
178
-
179
- export interface IABChannelSubDescriptor {
180
- IABBedMetaID?: number | null;
181
- IABChannelID?: number | null;
182
- }
183
-
184
- export interface IABEssenceDescriptor {
185
- InstanceID?: string | null;
186
- LinkedTrackID?: number | null;
187
- SampleRate?: EditRate | null;
188
- AudioSampleRate?: EditRate | null;
189
- ChannelCount?: number | null;
190
- QuantizationBits?: number | null;
191
- ContainerFormat?: string | null;
192
- SoundCompression?: string | null;
193
- Codec?: string | null;
194
- ElectrospatialFormulation?: number | null;
195
- SubDescriptors?: IABSubDescriptors | null;
196
- }
197
-
198
- export interface IABSequence {
199
- id: ImfUuid;
200
- trackId: ImfUuid;
201
- resourceList: ResourceList;
202
- }
203
-
204
- export interface IABSoundfieldLabelSubDescriptor {
205
- InstanceID?: string | null;
206
- MCATagSymbol?: McaTagSymbol | null;
207
- MCATagName?: string | null;
208
- MCALabelDictionaryID?: string | null;
209
- RFC5646SpokenLanguage?: LanguageTag | null;
210
- }
211
-
212
- export interface IABSubDescriptors {
213
- IABSoundfieldLabelSubDescriptor?: IABSoundfieldLabelSubDescriptor | null;
214
- IABChannelSubDescriptor?: IABChannelSubDescriptor[];
215
- }
216
-
217
- export interface ISXDDataEssenceDescriptor {
218
- InstanceID?: string | null;
219
- LinkedTrackID?: number | null;
220
- SampleRate?: EditRate | null;
221
- DataEssenceCoding?: string | null;
222
- NamespaceURI?: string | null;
223
- SubDescriptors?: IsxdSubDescriptors | null;
224
- }
225
-
226
- export interface ISXDSequence {
227
- id: ImfUuid;
228
- trackId: ImfUuid;
229
- resourceList: ResourceList;
230
- }
231
-
232
- export interface IsxdSubDescriptors {
233
- ContainerConstraintsSubDescriptor?: ContainerConstraintsSubDescriptor | null;
234
- }
235
-
236
- export interface J2CLayout {
237
- RGBAComponent?: RGBALayoutComponent[];
238
- }
239
-
240
- export interface J2KComponentSizing {
241
- Ssiz?: number | null;
242
- XRSiz?: number | null;
243
- YRSiz?: number | null;
244
- }
245
-
246
- export interface J2KExtendedCapabilities {
247
- Pcap?: number | null;
248
- }
249
-
250
- export interface JPEG2000SubDescriptor {
251
- InstanceID?: string | null;
252
- Rsiz?: number | null;
253
- Xsiz?: number | null;
254
- Ysiz?: number | null;
255
- XOsiz?: number | null;
256
- YOsiz?: number | null;
257
- XTsiz?: number | null;
258
- YTsiz?: number | null;
259
- XTOsiz?: number | null;
260
- YTOsiz?: number | null;
261
- Csiz?: number | null;
262
- CodingStyleDefault?: string | null;
263
- QuantizationDefault?: string | null;
264
- J2CLayout?: J2CLayout | null;
265
- J2KExtendedCapabilities?: J2KExtendedCapabilities | null;
266
- PictureComponentSizing?: PictureComponentSizing | null;
267
- }
268
-
269
- export interface LanguageList {
270
- languages: LanguageTag[];
271
- }
272
-
273
- export interface LanguageString {
274
- text: string;
275
- language: LanguageTag | null;
276
- }
277
-
278
- export interface Locale {
279
- languageList?: LanguageList | null;
280
- regionList?: RegionList | null;
281
- contentMaturityRatingList?: ContentMaturityRatingList | null;
282
- }
283
-
284
- export interface LocaleList {
285
- locales?: Locale[];
286
- }
287
-
288
- export interface MainAudioSequence {
289
- id: ImfUuid;
290
- trackId: ImfUuid;
291
- resourceList: ResourceList;
292
- }
293
-
294
- export interface MainImageSequence {
295
- id: ImfUuid;
296
- trackId: ImfUuid;
297
- resourceList: ResourceList;
298
- }
299
-
300
- export interface MarkerInfo {
301
- annotation?: string | null;
302
- label: MarkerLabelElement;
303
- offset: number;
304
- }
305
-
306
- export interface MarkerLabelElement {
307
- label: MarkerLabel;
308
- scope: string | null;
309
- }
310
-
311
- export interface MarkerSequence {
312
- id: ImfUuid;
313
- trackId: ImfUuid;
314
- resourceList: ResourceList;
315
- }
316
-
317
- export interface PHDRMetadataTrackSubDescriptor {
318
- InstanceID?: string | null;
319
- PHDRMetadataTrackSubDescriptor_DataDefinition?: string | null;
320
- PHDRMetadataTrackSubDescriptor_SimplePayloadSID?: number | null;
321
- PHDRMetadataTrackSubDescriptor_SourceTrackID?: number | null;
322
- }
323
-
324
- export interface PictureComponentSizing {
325
- J2KComponentSizing?: J2KComponentSizing[];
326
- }
327
-
328
- export interface RGBADescriptor {
329
- InstanceID?: string | null;
330
- DisplayWidth?: number | null;
331
- DisplayHeight?: number | null;
332
- StoredWidth?: number | null;
333
- StoredHeight?: number | null;
334
- SampleRate?: EditRate | null;
335
- ImageAspectRatio?: string | null;
336
- ColorPrimaries?: ColorPrimaries | null;
337
- TransferCharacteristic?: TransferCharacteristic | null;
338
- CodingEquations?: CodingEquations | null;
339
- PictureCompression?: VideoCodec | null;
340
- FrameLayout?: string | null;
341
- DisplayF2Offset?: number | null;
342
- ComponentMaxRef?: number | null;
343
- ComponentMinRef?: number | null;
344
- ScanningDirection?: string | null;
345
- StoredF2Offset?: number | null;
346
- SampledWidth?: number | null;
347
- SampledHeight?: number | null;
348
- SampledXOffset?: number | null;
349
- SampledYOffset?: number | null;
350
- AlphaTransparency?: string | null;
351
- ImageAlignmentOffset?: number | null;
352
- ImageStartOffset?: number | null;
353
- ImageEndOffset?: number | null;
354
- FieldDominance?: number | null;
355
- AlphaMaxRef?: number | null;
356
- AlphaMinRef?: number | null;
357
- Palette?: string | null;
358
- PaletteLayout?: string | null;
359
- LinkedTrackID?: number | null;
360
- SubDescriptors?: VideoSubDescriptors | null;
361
- }
362
-
363
- export interface RGBALayoutComponent {
364
- Code?: string;
365
- ComponentSize?: number;
366
- }
367
-
368
- export interface RegionList {
369
- regions: string[];
370
- }
371
-
372
- export interface Resolution {
373
- width: number;
374
- height: number;
375
- }
376
-
377
- export interface Resource {
378
- id: ImfUuid;
379
- annotation?: LanguageString | null;
380
- editRate?: EditRate | null;
381
- intrinsicDuration: number;
382
- entryPoint?: number | null;
383
- sourceDuration?: number | null;
384
- sourceEncoding?: ImfUuid | null;
385
- trackFileId?: ImfUuid | null;
386
- repeatCount?: number | null;
387
- keyId?: ImfUuid | null;
388
- hash?: string | null;
389
- markers?: MarkerInfo[];
390
- }
391
-
392
- export interface ResourceList {
393
- resources?: Resource[];
394
- }
395
-
396
- export interface Segment {
397
- id: ImfUuid;
398
- sequenceList: SequenceList;
399
- }
400
-
401
- export interface SegmentList {
402
- segments?: Segment[];
403
- }
404
-
405
- export interface SequenceList {
406
- markerSequences?: MarkerSequence[];
407
- mainImageSequences?: MainImageSequence[];
408
- mainAudioSequences?: MainAudioSequence[];
409
- subtitlesSequences?: SubtitlesSequence[];
410
- hearingImpairedCaptionsSequences?: HearingImpairedCaptionsSequence[];
411
- forcedNarrativeSequences?: ForcedNarrativeSequence[];
412
- iabSequences?: IABSequence[];
413
- isxdSequences?: ISXDSequence[];
414
- }
415
-
416
- export interface SoundfieldGroupLabelSubDescriptor {
417
- MCATagSymbol?: McaTagSymbol | null;
418
- MCATagName?: string | null;
419
- MCAAudioContentKind?: string | null;
420
- RFC5646SpokenLanguage?: LanguageTag | null;
421
- }
422
-
423
- export interface SubtitlesSequence {
424
- id: ImfUuid;
425
- trackId: ImfUuid;
426
- resourceList: ResourceList;
427
- }
428
-
429
- export interface TrackInfo {
430
- track_id: string;
431
- track_type: string;
432
- codec: string;
433
- language: string | null;
434
- channels: string | null;
435
- format_details: string | null;
436
- resolution: string | null;
437
- framerate: string | null;
438
- bit_depth: string | null;
439
- subtitle_type: string | null;
440
- }
441
-
442
- export interface VideoSubDescriptors {
443
- PHDRMetadataTrackSubDescriptor?: PHDRMetadataTrackSubDescriptor | null;
444
- JPEG2000SubDescriptor?: JPEG2000SubDescriptor | null;
445
- }
446
-
447
- export interface VolumeIndex {
448
- index: number;
449
- }
450
-
451
- export interface WAVEPCMDescriptor {
452
- InstanceID?: string | null;
453
- SampleRate?: EditRate | null;
454
- AudioSampleRate?: EditRate | null;
455
- ChannelCount?: number | null;
456
- QuantizationBits?: number | null;
457
- LinkedTrackID?: number | null;
458
- SubDescriptors?: AudioSubDescriptors | null;
459
- }
460
-
461
- export type CodingEquations = "Bt601" | "Bt709" | "Bt2020Ncl" | { Unknown: string };
462
-
463
- export type ColorPrimaries = "Bt601_625" | "Bt601_525" | "Bt709" | "Bt2020" | "DciP3" | "P3D65" | { Unknown: string };
464
-
465
- export type ContentKind = "Feature" | "Trailer" | "Test" | "Promo" | "Teaser" | "RatingBump" | "Advertisement" | "Episode" | "Short" | "Commercial" | "PublicServiceAnnouncement" | { Other: string };
466
-
467
- export type CplNamespace = "Smpte2067_3_2013" | "Smpte2067_3_2016" | "Dci429_7" | { Unknown: string };
468
-
469
- export type LanguageTag = string;
470
-
471
- export type MarkerLabel = "Ffoc" | "Lfoc" | "Ffac" | "Lfac" | "Ffmc" | "Lfmc" | "Ffhc" | "Lfhc" | { Other: string };
472
-
473
- export type McaTagSymbol = "Sg51" | "Sg71" | "Sg71Ds" | "SgSt" | "SgMono" | "Iab" | "Left" | "Right" | "Center" | "Lfe" | "LeftSurround" | "RightSurround" | "LeftSideSurround" | "RightSideSurround" | "LeftRearSurround" | "RightRearSurround" | { Other: string };
474
-
475
- export type TransferCharacteristic = "Linear" | "Bt709" | "Smpte240M" | "XvYcc709" | "Bt2020" | "PqSt2084" | "Hlg" | { Unknown: string };
476
-
477
- export type VideoCodec = "Jpeg2000" | "Jpeg2000Imf2k" | "Jpeg2000Imf4k" | "Jpeg2000Broadcast" | "Jpeg2000Ht" | "Vc5" | "Mpeg2" | "H264" | "H265" | "ProRes" | "Av1" | { Unknown: string };
478
-
479
3
 
480
4
  /**
481
5
  * Build a structured report from an IMF package.
@@ -488,16 +12,17 @@ export type VideoCodec = "Jpeg2000" | "Jpeg2000Imf2k" | "Jpeg2000Imf4k" | "Jpeg2
488
12
  *
489
13
  * Options (all optional):
490
14
  * - `coreSpec`: `"auto"` | `"v2013"` | `"v2016"` | `"v2020"`
491
- * - `app2eSpec`: `"auto"` | `"none"` | `"v2020"` | `"v2021"` | `"v2023"`
15
+ * - `cplSpec`: `"auto"` | `"v2013"` | `"v2016"` | `"v2020"` (ST 2067-3)
16
+ * - `iabSpec`: `"auto"` | `"v2019"` | `"v2021"` | `"v2026"` (ST 2067-201)
17
+ * - `app2eSpec`: `"auto"` | `"none"` | `"v2014"` | `"v2016"` | `"v2020"` | `"v2023"` | `"v2026"`
492
18
  * - `rules`: ESLint-style rules configuration object
493
19
  */
494
20
  export function buildReport(files: any, options: any): any;
495
21
 
496
22
  /**
497
- * Format a previously built `ImfReport` as a human-readable string.
23
+ * Format a validation result as a human-readable string.
498
24
  *
499
- * Pass the object returned by `buildReport()` (or any valid `ImfReport` JSON).
500
- * Returns the same output as `imferno report` on the CLI.
25
+ * Pass the object returned by `validate()`, or (legacy) by `buildReport()`.
501
26
  */
502
27
  export function formatReport(report: any): string;
503
28
 
@@ -511,6 +36,11 @@ export function getVersion(): string;
511
36
  */
512
37
  export function init(): void;
513
38
 
39
+ /**
40
+ * The rule catalogue: one entry per rule with its per-edition table.
41
+ */
42
+ export function listRules(): any;
43
+
514
44
  /**
515
45
  * Parse an IMF package from in-memory files, returning the full parsed package.
516
46
  *
@@ -519,6 +49,11 @@ export function init(): void;
519
49
  */
520
50
  export function parsePackage(files: any): any;
521
51
 
52
+ /**
53
+ * Convert a validation result (or its `validation` report) to a SARIF 2.1.0 log.
54
+ */
55
+ export function toSarif(report: any): any;
56
+
522
57
  /**
523
58
  * Parse and validate an IMF package in one call.
524
59
  *
@@ -537,7 +72,9 @@ export interface InitOutput {
537
72
  readonly formatReport: (a: any) => [number, number, number, number];
538
73
  readonly getVersion: () => [number, number];
539
74
  readonly init: () => void;
75
+ readonly listRules: () => [number, number, number];
540
76
  readonly parsePackage: (a: any) => [number, number, number];
77
+ readonly toSarif: (a: any) => [number, number, number];
541
78
  readonly validate: (a: any, b: any) => [number, number, number];
542
79
  readonly __wbindgen_malloc: (a: number, b: number) => number;
543
80
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
package/imferno_wasm.js CHANGED
@@ -11,7 +11,9 @@
11
11
  *
12
12
  * Options (all optional):
13
13
  * - `coreSpec`: `"auto"` | `"v2013"` | `"v2016"` | `"v2020"`
14
- * - `app2eSpec`: `"auto"` | `"none"` | `"v2020"` | `"v2021"` | `"v2023"`
14
+ * - `cplSpec`: `"auto"` | `"v2013"` | `"v2016"` | `"v2020"` (ST 2067-3)
15
+ * - `iabSpec`: `"auto"` | `"v2019"` | `"v2021"` | `"v2026"` (ST 2067-201)
16
+ * - `app2eSpec`: `"auto"` | `"none"` | `"v2014"` | `"v2016"` | `"v2020"` | `"v2023"` | `"v2026"`
15
17
  * - `rules`: ESLint-style rules configuration object
16
18
  * @param {any} files
17
19
  * @param {any} options
@@ -26,10 +28,9 @@ export function buildReport(files, options) {
26
28
  }
27
29
 
28
30
  /**
29
- * Format a previously built `ImfReport` as a human-readable string.
31
+ * Format a validation result as a human-readable string.
30
32
  *
31
- * Pass the object returned by `buildReport()` (or any valid `ImfReport` JSON).
32
- * Returns the same output as `imferno report` on the CLI.
33
+ * Pass the object returned by `validate()`, or (legacy) by `buildReport()`.
33
34
  * @param {any} report
34
35
  * @returns {string}
35
36
  */
@@ -76,6 +77,18 @@ export function init() {
76
77
  wasm.init();
77
78
  }
78
79
 
80
+ /**
81
+ * The rule catalogue: one entry per rule with its per-edition table.
82
+ * @returns {any}
83
+ */
84
+ export function listRules() {
85
+ const ret = wasm.listRules();
86
+ if (ret[2]) {
87
+ throw takeFromExternrefTable0(ret[1]);
88
+ }
89
+ return takeFromExternrefTable0(ret[0]);
90
+ }
91
+
79
92
  /**
80
93
  * Parse an IMF package from in-memory files, returning the full parsed package.
81
94
  *
@@ -92,6 +105,19 @@ export function parsePackage(files) {
92
105
  return takeFromExternrefTable0(ret[0]);
93
106
  }
94
107
 
108
+ /**
109
+ * Convert a validation result (or its `validation` report) to a SARIF 2.1.0 log.
110
+ * @param {any} report
111
+ * @returns {any}
112
+ */
113
+ export function toSarif(report) {
114
+ const ret = wasm.toSarif(report);
115
+ if (ret[2]) {
116
+ throw takeFromExternrefTable0(ret[1]);
117
+ }
118
+ return takeFromExternrefTable0(ret[0]);
119
+ }
120
+
95
121
  /**
96
122
  * Parse and validate an IMF package in one call.
97
123
  *
@@ -228,10 +254,6 @@ function __wbg_get_imports() {
228
254
  const ret = arg0[arg1 >>> 0];
229
255
  return ret;
230
256
  },
231
- __wbg_get_with_ref_key_fc601247060b7204: function(arg0, arg1) {
232
- const ret = arg0[arg1];
233
- return ret;
234
- },
235
257
  __wbg_instanceof_ArrayBuffer_12cdaa4161423e6b: function(arg0) {
236
258
  let result;
237
259
  try {
Binary file
@@ -5,7 +5,9 @@ export const buildReport: (a: any, b: any) => [number, number, number];
5
5
  export const formatReport: (a: any) => [number, number, number, number];
6
6
  export const getVersion: () => [number, number];
7
7
  export const init: () => void;
8
+ export const listRules: () => [number, number, number];
8
9
  export const parsePackage: (a: any) => [number, number, number];
10
+ export const toSarif: (a: any) => [number, number, number];
9
11
  export const validate: (a: any, b: any) => [number, number, number];
10
12
  export const __wbindgen_malloc: (a: number, b: number) => number;
11
13
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;