@@ -2169,7 +2169,7 @@ export class Parser extends DiagnosticEmitter {
21692169 tn . range ( )
21702170 ) ;
21712171 }
2172- returnType = this . parseType ( tn , name . kind == NodeKind . CONSTRUCTOR || isSetter ) ;
2172+ returnType = this . parseType ( tn , isSetter || name . kind == NodeKind . CONSTRUCTOR ) ;
21732173 if ( ! returnType ) return null ;
21742174 } else {
21752175 returnType = Node . createOmittedType ( tn . range ( tn . pos ) ) ;
@@ -2209,7 +2209,7 @@ export class Parser extends DiagnosticEmitter {
22092209 }
22102210 body = this . parseBlockStatement ( tn , false ) ;
22112211 if ( ! body ) return null ;
2212- } else if ( ! ( flags & ( CommonFlags . AMBIENT | CommonFlags . ABSTRACT ) ) && ! isInterface ) {
2212+ } else if ( ! isInterface && ! ( flags & ( CommonFlags . AMBIENT | CommonFlags . ABSTRACT ) ) ) {
22132213 this . error (
22142214 DiagnosticCode . Function_implementation_is_missing_or_not_immediately_following_the_declaration ,
22152215 tn . range ( )
@@ -2225,7 +2225,9 @@ export class Parser extends DiagnosticEmitter {
22252225 body ,
22262226 tn . range ( startPos , tn . pos )
22272227 ) ;
2228- tn . skip ( Token . SEMICOLON ) ;
2228+ if ( ! ( isInterface && tn . skip ( Token . COMMA ) ) ) {
2229+ tn . skip ( Token . SEMICOLON ) ;
2230+ }
22292231 return retMethod ;
22302232
22312233 } else if ( isConstructor ) {
@@ -2288,7 +2290,10 @@ export class Parser extends DiagnosticEmitter {
22882290 if ( ! initializer ) return null ;
22892291 }
22902292 let range = tn . range ( startPos , tn . pos ) ;
2291- if ( ( flags & CommonFlags . DEFINITELY_ASSIGNED ) != 0 && ( ( flags & CommonFlags . STATIC ) != 0 || isInterface || initializer !== null ) ) {
2293+ if (
2294+ ( flags & CommonFlags . DEFINITELY_ASSIGNED ) != 0 &&
2295+ ( isInterface || initializer !== null || ( flags & CommonFlags . STATIC ) != 0 )
2296+ ) {
22922297 this . error (
22932298 DiagnosticCode . A_definite_assignment_assertion_is_not_permitted_in_this_context ,
22942299 range
@@ -2302,7 +2307,9 @@ export class Parser extends DiagnosticEmitter {
23022307 initializer ,
23032308 range
23042309 ) ;
2305- tn . skip ( Token . SEMICOLON ) ;
2310+ if ( ! ( isInterface && tn . skip ( Token . COMMA ) ) ) {
2311+ tn . skip ( Token . SEMICOLON ) ;
2312+ }
23062313 return retField ;
23072314 }
23082315 return null ;
0 commit comments