Skip to content

Types error #10856

Closed
Closed
@webstyle

Description

@webstyle

TypeScript Version: 1.8.10

Code

let myString: string = '123';

myString += 123123;

console.log(myString); // returns number

*Expected behavior: Type 'number' is not assignable to type 'string'. *

*Actual behavior: 123123123 (number, no error) *

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions