/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/language-service/src/utils/decorators.ts
23 строки
656 B
Andrew Scott
refactor: remove all deep imports in language service
13 апр 2026, 11:16
13 апр 2026, 11:16
1ca9d28
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import type ts from 'typescript'; import {ReflectionHost, getAngularDecorators} from '@angular/compiler-cli'; export function isDirectiveOrComponent( node: ts.ClassDeclaration, reflector: ReflectionHost, ): boolean { const decorators = reflector.getDecoratorsOfDeclaration(node); if (decorators === null) { return false; } return ( getAngularDecorators(decorators, ['Directive', 'Component'], /* isCore */ false).length > 0 ); }