/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/forms/signals/src/api/assertions.ts
20 строк
549 B
Kristiyan Kostadinov
fix(forms): add utility to assert that value is a field tree
29 июл 2026, 18:53
29 июл 2026, 18:53
2a14184
Код
Авторство
О чём код?
/*! * @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 {FIELD_TREE} from './symbols'; import type {FieldTree} from './types'; /** * Asserts whether a value is a `FieldTree`. * @param value Value to be checked. * * @publicApi 22.1 */ export function isFieldTree(value: unknown): value is FieldTree<unknown> { return typeof value === 'function' && (value as any)[FIELD_TREE] === true; }