Remove checking for scriptTarget before setting parsing context for classLikeDeclaration

This commit is contained in:
Yui T 2015-04-01 18:28:13 -07:00
parent feabcd044b
commit 64427a9df1
2 changed files with 4 additions and 6 deletions

View file

@ -4756,9 +4756,7 @@ module ts {
function parseClassDeclarationOrExpression(fullStart: number, decorators: NodeArray<Decorator>, modifiers: ModifiersArray, kind: SyntaxKind): ClassLikeDeclaration {
// In ES6 specification, All parts of a ClassDeclaration or a ClassExpression are strict mode code
let savedStrictModeContext = inStrictModeContext();
if (languageVersion >= ScriptTarget.ES6) {
setStrictModeContext(true);
}
setStrictModeContext(true);
var node = <ClassLikeDeclaration>createNode(kind, fullStart);
node.decorators = decorators;

View file

@ -68,12 +68,12 @@ module ts.server {
};
}
private processRequest<T extends protocol.Request>(command: string, arguments?: any): T {
private processRequest<T extends protocol.Request>(command: string, args?: any): T {
var request: protocol.Request = {
seq: this.sequence++,
type: "request",
command: command,
arguments: arguments
arguments: args,
command
};
this.writeMessage(JSON.stringify(request));