版博士V2.0程序
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

20 linhas
2.0 KiB

  1. import type { JSONNode, JSONExpression, JSONNumberIdentifier, JSONIdentifier, JSONObjectExpression, JSONArrayExpression, JSONUnaryExpression, JSONNumberLiteral, JSONExpressionStatement, JSONProgram, JSONUndefinedIdentifier, JSONTemplateLiteral, JSONTemplateElement, JSONStringLiteral, JSONKeywordLiteral, JSONRegExpLiteral, JSONBigIntLiteral, JSONLiteral } from "../parser/ast";
  2. export declare function isExpression<N extends JSONNode>(node: N): node is N & JSONExpression;
  3. export declare function isNumberIdentifier(node: JSONIdentifier): node is JSONNumberIdentifier;
  4. export declare function isUndefinedIdentifier(node: JSONIdentifier): node is JSONUndefinedIdentifier;
  5. export declare type JSONValue = string | number | boolean | null | undefined | JSONObjectValue | JSONValue[] | RegExp | bigint;
  6. export declare type JSONObjectValue = {
  7. [key: string]: JSONValue;
  8. };
  9. export declare function getStaticJSONValue(node: JSONUnaryExpression | JSONNumberIdentifier | JSONNumberLiteral): number;
  10. export declare function getStaticJSONValue(node: JSONUndefinedIdentifier): undefined;
  11. export declare function getStaticJSONValue(node: JSONTemplateLiteral | JSONTemplateElement | JSONStringLiteral): string;
  12. export declare function getStaticJSONValue(node: JSONKeywordLiteral): boolean | null;
  13. export declare function getStaticJSONValue(node: JSONRegExpLiteral): RegExp;
  14. export declare function getStaticJSONValue(node: JSONBigIntLiteral): bigint;
  15. export declare function getStaticJSONValue(node: JSONLiteral): string | number | boolean | RegExp | bigint | null;
  16. export declare function getStaticJSONValue(node: Exclude<JSONExpression, JSONObjectExpression | JSONArrayExpression>): Exclude<JSONValue, JSONObjectValue | JSONValue[]>;
  17. export declare function getStaticJSONValue(node: JSONObjectExpression): JSONObjectValue;
  18. export declare function getStaticJSONValue(node: JSONArrayExpression): JSONValue[];
  19. export declare function getStaticJSONValue(node: JSONExpression | JSONExpressionStatement | JSONProgram | JSONNode): JSONValue;