TypeGuardWithArrayUnion.ts(2,5): error TS2564: Property 'value' has no initializer and is not definitely assigned in the constructor.


==== TypeGuardWithArrayUnion.ts (1 errors) ====
    class Message {
        value: string;
        ~~~~~
!!! error TS2564: Property 'value' has no initializer and is not definitely assigned in the constructor.
    }
    
    function saySize(message: Message | Message[]) {
        if (message instanceof Array) {
            return message.length;  // Should have type Message[] here
        }
    }
    