uriTemplate.d.ts 828 B

12345678910111213141516171819202122232425
  1. export type Variables = Record<string, string | string[]>;
  2. export declare class UriTemplate {
  3. /**
  4. * Returns true if the given string contains any URI template expressions.
  5. * A template expression is a sequence of characters enclosed in curly braces,
  6. * like {foo} or {?bar}.
  7. */
  8. static isTemplate(str: string): boolean;
  9. private static validateLength;
  10. private readonly template;
  11. private readonly parts;
  12. get variableNames(): string[];
  13. constructor(template: string);
  14. toString(): string;
  15. private parse;
  16. private getOperator;
  17. private getNames;
  18. private encodeValue;
  19. private expandPart;
  20. expand(variables: Variables): string;
  21. private escapeRegExp;
  22. private partToRegExp;
  23. match(uri: string): Variables | null;
  24. }
  25. //# sourceMappingURL=uriTemplate.d.ts.map