(source: AllowSharedBufferSource)
| 335 | }; |
| 336 | |
| 337 | export const toDataView = (source: AllowSharedBufferSource): DataView => { |
| 338 | if (source.constructor === DataView) { |
| 339 | return source; |
| 340 | } else if (ArrayBuffer.isView(source)) { |
| 341 | return new DataView(source.buffer, source.byteOffset, source.byteLength); |
| 342 | } else { |
| 343 | return new DataView(source); |
| 344 | } |
| 345 | }; |
| 346 | |
| 347 | export const promiseWithResolvers = <T = void>() => { |
| 348 | let resolve: (value: T) => void; |
no outgoing calls
no test coverage detected