mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-13 06:20:23 -06:00
Make certain types of FunctionLike require block bodies
This commit is contained in:
parent
6c85dbe140
commit
bc70e4a29d
@ -3572,7 +3572,7 @@ module ts {
|
||||
// A common error is to try to declare an accessor in an ambient class.
|
||||
if (inAmbientContext && canParseSemicolon()) {
|
||||
parseSemicolon();
|
||||
node.body = createMissingNode();
|
||||
node.body = <Block>createMissingNode();
|
||||
}
|
||||
else {
|
||||
node.body = parseBody(/* ignoreMissingOpenBrace */ false);
|
||||
|
||||
@ -336,13 +336,20 @@ module ts {
|
||||
|
||||
export interface FunctionDeclaration extends FunctionLike {
|
||||
name: Identifier;
|
||||
body?: Block;
|
||||
}
|
||||
|
||||
export interface MethodDeclaration extends FunctionLike { }
|
||||
export interface MethodDeclaration extends FunctionLike {
|
||||
body?: Block;
|
||||
}
|
||||
|
||||
export interface ConstructorDeclaration extends FunctionLike { }
|
||||
export interface ConstructorDeclaration extends FunctionLike {
|
||||
body?: Block;
|
||||
}
|
||||
|
||||
export interface AccessorDeclaration extends FunctionLike { }
|
||||
export interface AccessorDeclaration extends FunctionLike {
|
||||
body?: Block;
|
||||
}
|
||||
|
||||
export interface TypeNode extends Node { }
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user