Skip to content

'--alwaysStrict' option should not 'use strict' declaration if setting with module=es2015 #11806

Closed
@tetsuharuohzeki

Description

@tetsuharuohzeki

Env

  • TypeScript Version 2.1.0-dev.20161023
  • with enable --alwaysStrict & --module=es2015 option

Code

Compile the below code with the above options.

export const a = 1;

Actual behavior

"use strict";
export var a = 1;

Expected behavior

I think "use strict" declareation is needless for ES2015 module because "Module code is always strict mode code" by the spec.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions