(node *ast.Node)
| 4259 | } |
| 4260 | |
| 4261 | func (c *Checker) checkClassDeclaration(node *ast.Node) { |
| 4262 | firstDecorator := core.Find(node.ModifierNodes(), ast.IsDecorator) |
| 4263 | if c.legacyDecorators && firstDecorator != nil && core.Some(node.Members(), func(p *ast.Node) bool { |
| 4264 | return ast.HasStaticModifier(p) && ast.IsPrivateIdentifierClassElementDeclaration(p) |
| 4265 | }) { |
| 4266 | c.grammarErrorOnNode(firstDecorator, diagnostics.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator) |
| 4267 | } |
| 4268 | if node.Name() == nil && !ast.HasSyntacticModifier(node, ast.ModifierFlagsDefault) { |
| 4269 | c.grammarErrorOnFirstToken(node, diagnostics.A_class_declaration_without_the_default_modifier_must_have_a_name) |
| 4270 | } |
| 4271 | c.checkClassLikeDeclaration(node) |
| 4272 | c.checkSourceElements(node.Members()) |
| 4273 | c.registerForUnusedIdentifiersCheck(node) |
| 4274 | } |
| 4275 | |
| 4276 | func (c *Checker) checkClassLikeDeclaration(node *ast.Node) { |
| 4277 | c.checkGrammarClassLikeDeclaration(node) |
no test coverage detected