utils.d.ts 2.7 KB

12345678910111213141516171819202122232425
  1. export { default as hash } from 'hash-sum';
  2. import { ElementNode, RootNode, TemplateChildNode } from '@vue/compiler-core';
  3. import { ParserPlugin } from '@babel/parser';
  4. export declare const version: any;
  5. export { camelize, capitalize, isArray } from '@vue/shared';
  6. export declare let isRunningWithYarnPnp: boolean;
  7. export declare const isWindows: boolean;
  8. export declare function normalizePath(id: string): string;
  9. export declare function checkElementNodeTag(node: RootNode | TemplateChildNode | null | undefined, tag: string): node is ElementNode;
  10. export declare function normalizeIdentifier(str: string): Capitalize<string>;
  11. export declare function normalizePagePath(pagePath: string, platform: UniApp.PLATFORM): string | undefined;
  12. export declare function removeExt(str: string): string;
  13. export declare function normalizeNodeModules(str: string): string;
  14. export declare function normalizeMiniProgramFilename(filename: string, inputDir?: string): string;
  15. export declare function normalizeParsePlugins(importer: string, babelParserPlugins?: ParserPlugin[]): (import("@babel/parser").ParserPluginWithOptions | ("jsx" | "asyncDoExpressions" | "asyncGenerators" | "bigInt" | "classPrivateMethods" | "classPrivateProperties" | "classProperties" | "classStaticBlock" | "decimal" | "decorators-legacy" | "deferredImportEvaluation" | "decoratorAutoAccessors" | "destructuringPrivate" | "doExpressions" | "dynamicImport" | "explicitResourceManagement" | "exportDefaultFrom" | "exportNamespaceFrom" | "flow" | "flowComments" | "functionBind" | "functionSent" | "importMeta" | "logicalAssignment" | "importAssertions" | "importAttributes" | "importReflection" | "moduleBlocks" | "moduleStringNames" | "nullishCoalescingOperator" | "numericSeparator" | "objectRestSpread" | "optionalCatchBinding" | "optionalChaining" | "partialApplication" | "placeholders" | "privateIn" | "regexpUnicodeSets" | "sourcePhaseImports" | "throwExpressions" | "topLevelAwait" | "v8intrinsic" | "decorators" | "estree" | "moduleAttributes" | "optionalChainingAssign" | "pipelineOperator" | "recordAndTuple" | "typescript"))[];
  16. export declare function pathToGlob(pathString: string, glob: string, options?: {
  17. windows?: boolean;
  18. escape?: boolean;
  19. }): string;
  20. export declare function resolveSourceMapPath(outputDir?: string, platform?: UniApp.PLATFORM): string;
  21. export declare function installDepTips(type: 'dependencies' | 'devDependencies', module: string, version?: string): string;
  22. export declare function isAppVue(filename: string): boolean;
  23. export declare function resolveAppVue(inputDir: string): string;
  24. export declare function parseImporter(importer: string): string;
  25. export declare function createResolveErrorMsg(source: string, importer: string): string;