quote.d.ts 589 B

123456789101112131415161718192021
  1. import { Next } from "./types";
  2. /**
  3. * Quote a string.
  4. */
  5. export declare function quoteString(str: string): string;
  6. /**
  7. * Test for valid JavaScript identifier.
  8. */
  9. export declare const IS_VALID_IDENTIFIER: RegExp;
  10. /**
  11. * Check if a variable name is valid.
  12. */
  13. export declare function isValidVariableName(name: PropertyKey): name is string;
  14. /**
  15. * Quote JavaScript key access.
  16. */
  17. export declare function quoteKey(key: PropertyKey, next: Next): string | undefined;
  18. /**
  19. * Serialize the path to a string.
  20. */
  21. export declare function stringifyPath(path: PropertyKey[], next: Next): string;