property-name.d.ts 759 B

123456789101112131415161718
  1. /**
  2. * @license
  3. * Copyright Google LLC All Rights Reserved.
  4. *
  5. * Use of this source code is governed by an MIT-style license that can be
  6. * found in the LICENSE file at https://angular.dev/license
  7. */
  8. import * as ts from 'typescript';
  9. /** Type that describes a property name with an obtainable text. */
  10. type PropertyNameWithText = Exclude<ts.PropertyName, ts.ComputedPropertyName>;
  11. /**
  12. * Gets the text of the given property name. Returns null if the property
  13. * name couldn't be determined statically.
  14. */
  15. export declare function getPropertyNameText(node: ts.PropertyName): string | null;
  16. /** Checks whether the given property name has a text. */
  17. export declare function hasPropertyNameText(node: ts.PropertyName): node is PropertyNameWithText;
  18. export {};