(context *FormattingContext)
| 201 | } |
| 202 | |
| 203 | func isTypeAnnotationContext(context *FormattingContext) bool { |
| 204 | contextKind := context.contextNode.Kind |
| 205 | return contextKind == ast.KindPropertyDeclaration || |
| 206 | contextKind == ast.KindPropertySignature || |
| 207 | contextKind == ast.KindParameter || |
| 208 | contextKind == ast.KindVariableDeclaration || |
| 209 | ast.IsFunctionLikeKind(contextKind) |
| 210 | } |
| 211 | |
| 212 | func isOptionalPropertyContext(context *FormattingContext) bool { |
| 213 | return ast.IsPropertyDeclaration(context.contextNode) && ast.HasQuestionToken(context.contextNode) |
no test coverage detected