(pos, hasJSDoc, modifiers)
| 33661 | return withJSDoc(finishNode(node, pos), hasJSDoc); |
| 33662 | } |
| 33663 | function parsePropertyOrMethodSignature(pos, hasJSDoc, modifiers) { |
| 33664 | var name = parsePropertyName(); |
| 33665 | var questionToken = parseOptionalToken(57 /* SyntaxKind.QuestionToken */); |
| 33666 | var node; |
| 33667 | if (token() === 20 /* SyntaxKind.OpenParenToken */ || token() === 29 /* SyntaxKind.LessThanToken */) { |
| 33668 | // Method signatures don't exist in expression contexts. So they have neither |
| 33669 | // [Yield] nor [Await] |
| 33670 | var typeParameters = parseTypeParameters(); |
| 33671 | var parameters = parseParameters(4 /* SignatureFlags.Type */); |
| 33672 | var type = parseReturnType(58 /* SyntaxKind.ColonToken */, /*isType*/ true); |
| 33673 | node = factory.createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type); |
| 33674 | } |
| 33675 | else { |
| 33676 | var type = parseTypeAnnotation(); |
| 33677 | node = factory.createPropertySignature(modifiers, name, questionToken, type); |
| 33678 | // Although type literal properties cannot not have initializers, we attempt |
| 33679 | // to parse an initializer so we can report in the checker that an interface |
| 33680 | // property or type literal property cannot have an initializer. |
| 33681 | if (token() === 63 /* SyntaxKind.EqualsToken */) |
| 33682 | node.initializer = parseInitializer(); |
| 33683 | } |
| 33684 | parseTypeMemberSemicolon(); |
| 33685 | return withJSDoc(finishNode(node, pos), hasJSDoc); |
| 33686 | } |
| 33687 | function isTypeMemberStart() { |
| 33688 | // Return true if we have the start of a signature member |
| 33689 | if (token() === 20 /* SyntaxKind.OpenParenToken */ || |
no test coverage detected
searching dependent graphs…