(pos, hasJSDoc, decorators, modifiers, kind)
| 36629 | return parsePropertyDeclaration(pos, hasJSDoc, decorators, modifiers, name, questionToken); |
| 36630 | } |
| 36631 | function parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, kind) { |
| 36632 | var name = parsePropertyName(); |
| 36633 | var typeParameters = parseTypeParameters(); |
| 36634 | var parameters = parseParameters(0 /* SignatureFlags.None */); |
| 36635 | var type = parseReturnType(58 /* SyntaxKind.ColonToken */, /*isType*/ false); |
| 36636 | var body = parseFunctionBlockOrSemicolon(0 /* SignatureFlags.None */); |
| 36637 | var node = kind === 172 /* SyntaxKind.GetAccessor */ |
| 36638 | ? factory.createGetAccessorDeclaration(decorators, modifiers, name, parameters, type, body) |
| 36639 | : factory.createSetAccessorDeclaration(decorators, modifiers, name, parameters, body); |
| 36640 | // Keep track of `typeParameters` (for both) and `type` (for setters) if they were parsed those indicate grammar errors |
| 36641 | node.typeParameters = typeParameters; |
| 36642 | if (type && node.kind === 173 /* SyntaxKind.SetAccessor */) |
| 36643 | node.type = type; |
| 36644 | return withJSDoc(finishNode(node, pos), hasJSDoc); |
| 36645 | } |
| 36646 | function isClassMemberStart() { |
| 36647 | var idToken; |
| 36648 | if (token() === 59 /* SyntaxKind.AtToken */) { |
no test coverage detected