Skip to content

Instantly share code, notes, and snippets.

@craigphicks
Created September 8, 2021 18:13
Show Gist options
  • Select an option

  • Save craigphicks/49b31c800a6ce2ef2a67006b84ec4d5a to your computer and use it in GitHub Desktop.

Select an option

Save craigphicks/49b31c800a6ce2ef2a67006b84ec4d5a to your computer and use it in GitHub Desktop.

Revisions

  1. craigphicks created this gist Sep 8, 2021.
    173 changes: 173 additions & 0 deletions 'type T1 = [x: number, x?: boolean]'.dump
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,173 @@
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    {
    "type": {
    "info": "this is a ts.Type with id=86",
    "flags": [
    "Union"
    ],
    "objectFlags": [
    "PrimitiveUnion"
    ]
    },
    "discTypeFlag": "Union",
    "r": {
    "types": [
    {
    "info": "this is a ts.Type with id=10",
    "flags": [
    "Undefined"
    ]
    },
    {
    "info": "this is a ts.Type with id=16",
    "flags": [
    "BooleanLiteral"
    ]
    },
    {
    "info": "this is a ts.Type with id=18",
    "flags": [
    "BooleanLiteral"
    ]
    }
    ]
    },
    "c": {
    "ctypes": [
    {
    "discTypeFlag": "Undefined"
    },
    {
    "discTypeFlag": "BooleanLiteral",
    "value": false
    },
    {
    "discTypeFlag": "BooleanLiteral",
    "value": true
    }
    ]
    }
    }
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    {
    "type": {
    "info": "this is a ts.Type with id=10",
    "flags": [
    "Undefined"
    ]
    },
    "discTypeFlag": "Undefined"
    }
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    {
    "type": {
    "info": "this is a ts.Type with id=16",
    "flags": [
    "BooleanLiteral"
    ]
    },
    "discTypeFlag": "BooleanLiteral",
    "value": false
    }
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    {
    "type": {
    "info": "this is a ts.Type with id=18",
    "flags": [
    "BooleanLiteral"
    ]
    },
    "discTypeFlag": "BooleanLiteral",
    "value": true
    }
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    {
    "type": {
    "info": "this is a ts.Type with id=85",
    "flags": [
    "Object"
    ],
    "objectFlags": [
    "Reference"
    ],
    "typeArguments": [
    {
    "info": "this is a ts.Type with id=13",
    "flags": [
    "Number"
    ]
    },
    {
    "info": "this is a ts.Type with id=86",
    "flags": [
    "Union"
    ],
    "objectFlags": [
    "PrimitiveUnion"
    ]
    }
    ]
    },
    "objectSubType": "tuple",
    "discTypeFlag": "Object",
    "r": {
    "typeArguments": [
    {
    "info": "this is a ts.Type with id=13",
    "flags": [
    "Number"
    ]
    },
    {
    "info": "this is a ts.Type with id=86",
    "flags": [
    "Union"
    ],
    "objectFlags": [
    "PrimitiveUnion"
    ]
    }
    ]
    },
    "c": {
    "ctypes": [
    {
    "discTypeFlag": "Number"
    },
    {
    "$ref": {
    "info": "this is a ts.Type with id=86"
    },
    "discTypeFlag": "Union"
    }
    ]
    },
    "target": {
    "elementFlags": [
    [
    "Required"
    ],
    [
    "Optional"
    ]
    ],
    "hasRestElement": false,
    "fixedLength": 2,
    "minLength": 1,
    "combinedFlags": [
    "Required",
    "Optional"
    ],
    "readonly": false
    }
    }
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    {
    "type": {
    "info": "this is a ts.Type with id=13",
    "flags": [
    "Number"
    ]
    },
    "discTypeFlag": "Number"
    }