8000 Can't use ES6 string methods when not targeting ES6 · Issue #4887 · microsoft/TypeScript · GitHub
[go: up one dir, main page]

Skip to content
Can't use ES6 string methods when not targeting ES6 #4887
@slikts

Description

@slikts

Other ES6 features work when not targeting ES6, but methods like String.prototype.startsWith produce compilation errors. My expectation was that ES6 features would work regardless of the target version, and it's not clear what the distinction between the string methods and other features is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already createdQuestionAn issue which isn't directly actionable in code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0