kungfooman / RuntimeTypeInspector.js

Checking JSDoc types at runtime for high-quality types - Trust is good, control is better.
MIT License
8 stars 0 forks source link

Implement TypeOperator (keyof) #85

Closed kungfooman closed 7 months ago

kungfooman commented 7 months ago

Latest transformers.js contains this type:

const DataTypeMap = Object.freeze({
    float32: Float32Array,
    float64: Float64Array,
    string: Array, // string[]
    int8: Int8Array,
    uint8: Uint8Array,
    int16: Int16Array,
    uint16: Uint16Array,
    int32: Int32Array,
    uint32: Uint32Array,
    int64: BigInt64Array,
    uint64: BigUint64Array,
    bool: Uint8Array,
});
/**
 * @typedef {keyof typeof DataTypeMap} DataType
 */

(which is unhandled currently)

https://ts-ast-viewer.com/#code/C4TwDgpgBMC2ZQLxQNYRAewGY3BbUAIgIbDEAqeAssWANxA

image