Ensure that the entire contents of the prologue are simply 'use strict'.

This commit is contained in:
Daniel Rosenwasser 2016-04-07 00:55:02 -07:00
parent 1317d23a8a
commit 2abc736955

View File

@ -1204,7 +1204,7 @@ namespace ts {
// Utilities
function isUseStrictPrologue(node: ExpressionStatement): boolean {
return !!(node.expression as StringLiteral).text.match(/use strict/);
return (node.expression as StringLiteral).text === "use strict";
}
export function addPrologueDirectives(target: Statement[], source: Statement[], ensureUseStrict?: boolean): number {