stringLiteralsWithTypeAssertions01.ts(5,9): error TS2454: Variable 'fooOrBar' is used before being assigned.
stringLiteralsWithTypeAssertions01.ts(6,9): error TS2454: Variable 'fooOrBar' is used before being assigned.
stringLiteralsWithTypeAssertions01.ts(7,9): error TS2454: Variable 'fooOrBar' is used before being assigned.


==== stringLiteralsWithTypeAssertions01.ts (3 errors) ====
    let fooOrBar: "foo" | "bar";
    
    let a = "foo" as "bar";
    let b = "bar" as "foo";
    let c = fooOrBar as "foo";
            ~~~~~~~~
!!! error TS2454: Variable 'fooOrBar' is used before being assigned.
    let d = fooOrBar as "bar";
            ~~~~~~~~
!!! error TS2454: Variable 'fooOrBar' is used before being assigned.
    let e = fooOrBar as "baz";
            ~~~~~~~~
!!! error TS2454: Variable 'fooOrBar' is used before being assigned.
    let f = "baz" as typeof fooOrBar;