Skip to content

tslint use of Map breaks jake runtests #14477

Description

@aozgaa

TypeScript Version: 2.1.1 / nightly (2.2.0-dev.201xxxxx)

Not sure if this is an issue with with our jake runtests scripts or tslint itself, so posting here for now.

Running jake runtests after a fresh npm install over the weekend led to a failure as part of building.
Blame indicates the Map type annotations were added in this merged PR in tslint: palantir/tslint#2284

As a workaround, I can just edit the offending d.ts file in the node_modules and change the type annotations back to any, but this is obviously not a desirable long-term solution

Output of running tests:

PS C:\repo\TypeScript> jake runtests --trace
node lib\tsc.js --noImplicitAny --noImplicitThis --noEmitOnError --types  --pretty --preserveConstEnums --outDir built\l
ocal\tslint --module commonjs -sourcemap -mapRoot file:///C:\repo\TypeScript\built\local\tslint --target es5 --lib es5,s
cripthost --noUnusedLocals --noUnusedParameters scripts\tslint\nextLineRule.ts


4     jsRules: Map<string, Partial<IOptions>>;
               ~~~

node_modules/tslint/lib/configuration.d.ts(4,14): error TS2304: Cannot find name 'Map'.


9     rules: Map<string, Partial<IOptions>>;
             ~~~

node_modules/tslint/lib/configuration.d.ts(9,12): error TS2304: Cannot find name 'Map'.


66 export declare function convertRuleOptions(ruleConfiguration: Map<string, Partial<IOptions>>): IOptions[];
                                                                 ~~~

node_modules/tslint/lib/configuration.d.ts(66,63): error TS2304: Cannot find name 'Map'.


9     getEnableDisableRuleMap(): Map<string, IEnableDisablePosition[]>;
                                 ~~~

node_modules/tslint/lib/enableDisableRules.d.ts(9,32): error TS2304: Cannot find name 'Map'.


7 export declare function loadRules(ruleOptionsList: IOptions[], enableDisableRuleMap: Map<string, IEnableDisablePositio
n[]>, rulesDirectories?: string | string[], isJs?: boolean): IRule[];
                                                                                       ~~~

node_modules/tslint/lib/ruleLoader.d.ts(7,86): error TS2304: Cannot find name 'Map'.

jake aborted.
Error: ENOENT: no such file or directory, unlink 'C:\repo\TypeScript\built\local\tslint\nextLineRule.js'
    at Object.fs.unlinkSync (fs.js:988:18)
    at Exec.<anonymous> (C:\repo\TypeScript\Jakefile.js:361:16)
    at emitTwo (events.js:106:13)
    at Exec.emit (events.js:191:7)
    at ChildProcess.<anonymous> (C:\Users\aozga\AppData\Roaming\nvm\v7.0.0\node_modules\jake\lib\utils\index.js:227:20)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions