TypeScript/tests/cases/conformance/types/stringLiteral/stringLiteralTypesAndParenthesizedExpressions01.ts
2015-11-10 11:56:32 -08:00

8 lines
233 B
TypeScript

// @declaration: true
declare function myRandBool(): boolean;
let a: "foo" = ("foo");
let b: "foo" | "bar" = ("foo");
let c: "foo" = (myRandBool ? "foo" : ("foo"));
let d: "foo" | "bar" = (myRandBool ? "foo" : ("bar"));