@acoustic-content-sdk/schematics-utils 中文文档教程

发布于 4年前 浏览 17 更新于 3年前

npm

API Documentation

首页 > @acoustic-content-sdk/schematics-utils

schematics-utils package

用于实现原理图的帮助库。

Classes

Class Description
InsertChange Will add text to the source code.
NoopChange An operation that does nothing.
RemoveChange Will remove text from the source code.
ReplaceChange Will replace text from the source code.

Enumerations

Enumeration Description
Builders
DEP_TYPE
NodeDependencyType
ProjectType

Functions

Function Description
addBootstrapToModule(source, modulePath, classifiedName, importPath) Custom function to insert an export into NgModule. It also imports it.
addDeclarationToModule(source, modulePath, classifiedName, importPath) Custom function to insert a declaration (component, pipe, directive) into NgModule declarations. It also imports the component.
addEntryComponentToModule(source, modulePath, classifiedName, importPath) Custom function to insert an entryComponent into NgModule. It also imports it.
addExportToModule(source, modulePath, classifiedName, importPath) Custom function to insert an export into NgModule. It also imports it.
addImportsToModule(aFile, aModules, aHost) Changes the identified module by adding a couple of imports
addImportToModule(source, modulePath, classifiedName, importPath) Custom function to insert an NgModule into NgModule imports. It also imports the module.
addPackageJsonDependency(tree, dependency)
addProjectToWorkspace(workspace, name, project)
addProviderToModule(source, modulePath, classifiedName, importPath) Custom function to insert a provider into NgModule. It also imports it.
addRouteDeclarationToModule(source, fileToAdd, routeLiteral) Adds a new route declaration to a router module (i.e. has a RouterModule declaration)
addSymbolToNgModuleMetadata(source, ngModulePath, metadataField, symbolName, importPath)
addToWchToolsDependencies(aDeps, aPkg)
assertHasTrailingSlash(aValue)
assertIsEmail(aValue, aName)
assertIsUrl(aValue, aName)
assertIsValidUserName(aValue, aName)
assertNotNull(aValue, aName)
assertParameter(aValue, aParameterName)
buildDefaultPath(project) Build a default project path for generating.
buildRelativePath(from, to) Build a relative path from one file path to another file path.
byIdentifier(aName)
byName(aText)
byText(aText)
byType(aType)
byTypeAndName(aType, aName)
canonicalizeJSON(aData)
changeSourceFile(aFile, aOp, aHost)
copyDir(aSrc, aDst, aHost, aLogger) Copies from source to target and overrides the target. But does not delete extra files
createLoggerService(context) Constructs the logger service on top of the context
createTransientTree(aRoot) Creates a transient copy of a tree
ensureTrailingSlash(aUrl)
findBootstrapModuleCall(host, mainPath)
findBootstrapModulePath(host, mainPath)
findDataDir(host, options)
findModule(host, generateDir, moduleExt, routingModuleExt) Function to find the "closest" module to a generated file's path.
findModuleFromOptions(host, options) Find the module referred by a set of options passed to the schematics.
findNode(node, kind, text)
findNodes(node, kind, max, recursive) Find all nodes from the AST in the subtree of node of SyntaxKind kind.
findPackageJson(aDir)
findProject(workspaceOrHost, options) Locates the workspace project, either from the configured project name, else falls back to the default project
findProjectName(workspaceOrHost, options) Locates the workspace project, either from the configured project name, else falls back to the default project
findSdkVersion(host)
findWchToolsOptions(host, options)
getAppFromConfig(config, appIndexOrName)
getAppModulePath(host, mainPath)
getConfig(host)
getContentOfKeyLiteral(_source, node)
getDecoratorMetadata(source, identifier, module)
getEnvironmentExportName(source) This function returns the name of the environment export whether this export is aliased or not. If the environment file is not imported, then it will return null.
getFirstNgModuleName(source) Given a source file with class(es), find the name of the first class.
getFolderForType(aType)
getMetadataField(node, metadataField)
getPackageJsonDependency(tree, name)
getPackageManager(aHost) Decodes the supported workspace from the host
getProject(workspaceOrHost, projectName)
getProjectTargets(project)
getProjectTargets(workspaceOrHost, projectName)
getRouterModuleDeclaration(source) Returns the RouterModule declaration from NgModule metadata, if any.
getSourceFile(host, path)
getSourceFileFromFileEntry(aEntry)
getSourceNodes(sourceFile) Get all the nodes from a source.
getWorkspace(host)
getWorkspacePath(host)
hasTrailingSlash(aUrl)
insertAfterLastOccurrence(nodes, toInsert, file, fallbackPos, syntaxKind) Insert toInsert after the last occurence of ts.SyntaxKind[nodes[i].kind] or after the last of occurence of syntaxKind if the last occurence is a sub child of SyntaxKind[nodes[i].kind] and save the changes in file.
insertChanges(aChanges, aRecorder)
insertImport(source, fileToEdit, symbolName, fileName, isDefault) Add Import import { symbolName } from fileName if the import doesn't exit already. Assumes fileToEdit can be resolved and accessed.
insertLines(aSource, aInsert)
isImported(source, classifiedName, importPath) Determine if an import already exists.
isValidEmail(aValue)
isValidUrl(aValue)
isValidUserName(aValue)
isWorkspaceProject(project)
isWorkspaceSchema(workspace)
locatePackageJson(aDir) Locates the name of the package.json starting with the current directory
parseLines(aSource)
parseName(path, name)
readBufferOnTree(aHost, aRoot) Constructs the ReadBuffer callback on top of a host
readDirectoryOnTree(aHost, aRoot) Creates a function callback that reads files from a host
readRelativeDirectoryOnTree(aHost, aRoot) Creates a function callback that reads files from a host
readTextFileOnTree(aHost, aRoot) Constructs the ReadTextFile callback on top of a host
readWorkspace(aRoot) Reads a workspace definition based on a root path
removePackageJsonDependency(tree, name)
rxDownload(aUri, aDstFile)
rxFormPost(aUri, aData)
rxGet(aUri)
rxGetJson(aUri)
rxLocateDir(aSrcDir, aPredicate) Locates the directory across the parent chain for which the predicate matches
rxTransformHtmlFile(aName, aOp, aTree) Reads an HMTL from the tree and then transforms it using the given function. If the result is null or undefined, the file will be deleted, else replaced or created.
rxTransformHtmlFragment(aName, aOp, aTree) Reads an HMTL from the tree and then transforms it using the given function. If the result is null or undefined, the file will be deleted, else replaced or created.
rxTransformJsonFile(aName, aOp, aTree) Reads a JSON file from the tree and then transforms it using the given function. If the result is null or undefined, the file will be deleted, else replaced or created.
rxTransformLinesFile(aName, aOp, aTree) Reads a line based file from the tree and then transforms it using the given function. If the result is null or undefined, the file will be deleted, else replaced or created.
rxTransformTextFile(aName, aOp, aTree) Reads a text file from the tree and then transforms it using the given function. If the result is null or undefined, the file will be deleted, else replaced or created.
rxUnzipFromUrl(aTree, aSrcUrl, aDstDir, aSkip)
safeWrite(aPath, aFile, aHost) Overwrites file content, but only if it differs
serializeJson(aData)
serializeLines(aSource)
syncDir(aSrc, aDst, aHost, aLogger)
targetBuildNotFoundError()
updateField(aName, aGenerator, aObj)
updateMinVersion(aName, aMinVersion, aPkg, aType) Updates the package JSON to use at least the given version
updateWorkspace(workspace)
validateApiUrl(aUrl, bValidateWithCredentials) Tests if the API URL is valid and if we have sufficient credentials to access the API
validateCredentials(aApiUrl, aCredentials)
validateHtmlSelector(selector)
validateName(name)
validateProjectName(projectName)
writeFilesOnTree(aHost, aRoot) Returns an operator that writes all file descriptors to disk

Interfaces

Interface Description
AppConfig
AppShellBuilderOptions
BrowserBuilderBaseOptions
BrowserBuilderOptions
BuilderTarget
Change
CliConfig
E2EOptions
ExtractI18nOptions
FileReplacements
Host Copyright Google Inc. All Rights Reserved.Use of this source code is governed by an MIT-style license that can be found in the LICENSE file at https://angular.io/license
LibraryBuilderOptions
LintBuilderOptions
Location
ModuleOptions
NodeDependency
ServeBuilderOptions
ServerBuilderOptions
TestBuilderOptions
WorkspaceProject
WorkspaceSchema
WorkspaceTargets
ZipEntry

Variables

Variable Description
ajaxRequest
configPath
createXHR
htmlSelectorRe
MODULE_EXT
NOOP_LOGGER
ROUTING_MODULE_EXT
rxDeleteFile
rxReadTextFile
rxReadZip Export the function to extract a zip file
rxTmpFile
rxUnlink
TENANT_BASED_URL_REGEXP
VERSION Version and build number of the package
WCHTOOLS_DEPENDENCIES
writeBufferOnTree Constructs a WriteTextFile on top of a host
writeTextFileOnTree Constructs a WriteTextFile on top of a host

Type Aliases

Type Alias Description
AppShellBuilderTarget
BrowserBuilderTarget
E2EBuilderTarget
ExtractI18nBuilderTarget
LibraryBuilderTarget
LintBuilderTarget
OutputHashing
ServeBuilderTarget
ServerBuilderTarget
TestBuilderTarget
TransformCallback
TransformWithoutPath
TransformWithPath

Home > @acoustic-content-sdk/schematics-utils > InsertChange

InsertChange class

将文本添加到源代码。

Signature:

export declare class InsertChange implements Change 

Constructors

Constructor Modifiers Description
(constructor)(path, pos, toAdd) Constructs a new instance of the InsertChange class

Properties

Property Modifiers Type Description
description string
order number
path string
pos number
toAdd string

Methods

Method Modifiers Description
apply(host) This method does not insert spaces if there is none in the original string.

Home > @acoustic-content-sdk/schematics-utils > NoopChange

NoopChange class

什么都不做的操作。

Signature:

export declare class NoopChange implements Change 

Properties

Property Modifiers Type Description
description string
order number
path any

Methods

Method Modifiers Description
apply()

Home > @acoustic-content-sdk/schematics-utils > RemoveChange

RemoveChange class

将从源代码中删除文本。

Signature:

export declare class RemoveChange implements Change 

Constructors

Constructor Modifiers Description
(constructor)(path, pos, toRemove) Constructs a new instance of the RemoveChange class

Properties

Property Modifiers Type Description
description string
order number
path string

Methods

Method Modifiers Description
apply(host)

Home > @acoustic-content-sdk/schematics-utils > ReplaceChange

ReplaceChange class

将替换源代码中的文本。

Signature:

export declare class ReplaceChange implements Change 

Constructors

Constructor Modifiers Description
(constructor)(path, pos, oldText, newText) Constructs a new instance of the ReplaceChange class

Properties

Property Modifiers Type Description
description string
order number
path string

Methods

Method Modifiers Description
apply(host)

Home > @acoustic-content-sdk/schematics-utils > Builders

Builders enum

Signature:

export declare enum Builders 

Enumeration Members

Member Value Description
AppShell "@angular-devkit/build-angular:app-shell"
Browser "@angular-devkit/build-angular:browser"
DevServer "@angular-devkit/build-angular:dev-server"
ExtractI18n "@angular-devkit/build-angular:extract-i18n"
Karma "@angular-devkit/build-angular:karma"
NgPackagr "@angular-devkit/build-ng-packagr:build"
Protractor "@angular-devkit/build-angular:protractor"
Server "@angular-devkit/build-angular:server"
TsLint "@angular-devkit/build-angular:tslint"

Home > ; @acoustic-content-sdk/schematics-utils > DEP_TYPE

DEP_TYPE enum

Signature:

export declare enum DEP_TYPE 

Enumeration Members

Member Value Description
DEVELOPMENT 2
PEER 0
RUNTIME 1

Home > ; @acoustic-content-sdk/schematics-utils > NodeDependencyType

NodeDependencyType enum

Signature:

export declare enum NodeDependencyType 

Enumeration Members

Member Value Description
Default "dependencies"
Dev "devDependencies"
Optional "optionalDependencies"
Peer "peerDependencies"

Home > ; @acoustic-content-sdk/schematics-utils > ProjectType

ProjectType enum

Signature:

export declare enum ProjectType 

Enumeration Members

Member Value Description
Application "application"
Library "library"

Home > ; @acoustic-content-sdk/schematics-utils > addBootstrapToModule

addBootstrapToModule() function

用于将导出插入 NgModule 的自定义函数。 它还将其导入。

Signature:

export declare function addBootstrapToModule(source: SourceFile, modulePath: string, classifiedName: string, importPath: string): Change[];

Parameters

Parameter Type Description
source SourceFile
modulePath string
classifiedName string
importPath string

Returns:

Change[]

Home > @acoustic-content-sdk/schematics-utils > addDeclarationToModule

addDeclarationToModule() function

将声明(组件、管道、指令)插入到 NgModule 声明中的自定义函数。 它还导入组件。

Signature:

export declare function addDeclarationToModule(source: SourceFile, modulePath: string, classifiedName: string, importPath: string): Change[];

Parameters

Parameter Type Description
source SourceFile
modulePath string
classifiedName string
importPath string

Returns:

Change[]

Home > @acoustic-content-sdk/schematics-utils > addEntryComponentToModule

addEntryComponentToModule() function

警告:此 API 现在已过时。

  • Since version 9.0.0 with Ivy, entryComponents is no longer necessary.

将 entryComponent 插入 NgModule 的自定义函数。 它还将其导入。

Signature:

export declare function addEntryComponentToModule(source: SourceFile, modulePath: string, classifiedName: string, importPath: string): Change[];

Parameters

Parameter Type Description
source SourceFile
modulePath string
classifiedName string
importPath string

Returns:

Change[]

Home > @acoustic-content-sdk/schematics-utils > addExportToModule

addExportToModule() function

将导出插入到 NgModule 中的自定义函数。 它还将其导入。

Signature:

export declare function addExportToModule(source: SourceFile, modulePath: string, classifiedName: string, importPath: string): Change[];

Parameters

Parameter Type Description
source SourceFile
modulePath string
classifiedName string
importPath string

Returns:

Change[]

Home > @acoustic-content-sdk/schematics-utils > addImportsToModule

addImportsToModule() function

通过添加几个导入更改已识别的模块

签名:

export declare function addImportsToModule(aFile: string, aModules: {
    [identifier: string]: string;
}, aHost: Tree): void;

Parameters

Parameter Type Description
aFile string the filename
aModules {
[identifier: string]: string;
}
the modules to be added
aHost Tree the tree

返回:

void

@acoustic-content-sdk/schematics-utils > addImportToModule

addImportToModule() function

自定义函数,用于将 NgModule 插入到 NgModule 导入中。 它还导入模块。

Signature:

export declare function addImportToModule(source: SourceFile, modulePath: string, classifiedName: string, importPath: string): Change[];

Parameters

Parameter Type Description
source SourceFile
modulePath string
classifiedName string
importPath string

Returns:

Change[]

Home > @acoustic-content-sdk/schematics-utils > addPackageJsonDependency

addPackageJsonDependency() function

Signature:

export declare function addPackageJsonDependency(tree: Tree, dependency: NodeDependency): void;

Parameters

Parameter Type Description
tree Tree
dependency NodeDependency

Returns:

void

主页 > @acoustic-content-sdk/schematics-utils > addProjectToWorkspace

addProjectToWorkspace() function

Signature:

export declare function addProjectToWorkspace<TProjectType extends ProjectType = ProjectType.Application>(workspace: WorkspaceSchema, name: string, project: WorkspaceProject<TProjectType>): Rule;

Parameters

Parameter Type Description
workspace WorkspaceSchema
name string
project WorkspaceProject&lt;TProjectType&gt;

Returns:

Rule

主页 > @acoustic-content-sdk/schematics-utils > addProviderToModule

addProviderToModule() function

将提供程序插入 NgModule 的自定义函数。 它还将其导入。

Signature:

export declare function addProviderToModule(source: SourceFile, modulePath: string, classifiedName: string, importPath: string): Change[];

Parameters

Parameter Type Description
source SourceFile
modulePath string
classifiedName string
importPath string

Returns:

Change[]

Home > @acoustic-content-sdk/schematics-utils > addRouteDeclarationToModule

addRouteDeclarationToModule() function

向路由器模块添加新的路由声明(即具有 RouterModule 声明)

签名:

export declare function addRouteDeclarationToModule(source: SourceFile, fileToAdd: string, routeLiteral: string): Change;

Parameters

Parameter Type Description
source SourceFile
fileToAdd string
routeLiteral string

返回:

Change

Home > @acoustic-content-sdk/schematics-utils > addSymbolToNgModuleMetadata

addSymbolToNgModuleMetadata() function

Signature:

export declare function addSymbolToNgModuleMetadata(source: SourceFile, ngModulePath: string, metadataField: string, symbolName: string, importPath?: string | null): Change[];

Parameters

Parameter Type Description
source SourceFile
ngModulePath string
metadataField string
symbolName string
importPath string &#124; null

Returns:

Change[]

首页 > @acoustic-content-sdk/schematics-utils > addToWchToolsDependencies

addToWchToolsDependencies() function

Signature:

export declare function addToWchToolsDependencies(aDeps: string[], aPkg: any): void;

Parameters

Parameter Type Description
aDeps string[]
aPkg any

Returns:

void

主页 > @acoustic-content-sdk/schematics-utils > assertHasTrailingSlash

assertHasTrailingSlash() function

Signature:

export declare function assertHasTrailingSlash(aValue: any): string;

Parameters

Parameter Type Description
aValue any

Returns:

string

主页 > @acoustic-content-sdk/schematics-utils > assertIsEmail

assertIsEmail() function

Signature:

export declare function assertIsEmail(aValue: any, aName?: string): string;

Parameters

Parameter Type Description
aValue any
aName string

Returns:

string

主页 > @acoustic-content-sdk/schematics-utils > assertIsUrl

assertIsUrl() function

Signature:

export declare function assertIsUrl(aValue: any, aName?: string): string;

Parameters

Parameter Type Description
aValue any
aName string

Returns:

string

主页 > @acoustic-content-sdk/schematics-utils > assertIsValidUserName

assertIsValidUserName() function

Signature:

export declare function assertIsValidUserName(aValue: any, aName?: string): string;

Parameters

Parameter Type Description
aValue any
aName string

Returns:

string

主页 > @acoustic-content-sdk/schematics-utils > assertNotNull

assertNotNull() function

Signature:

export declare function assertNotNull(aValue: any, aName?: string): void;

Parameters

Parameter Type Description
aValue any
aName string

Returns:

void

主页 > @acoustic-content-sdk/schematics-utils > assertParameter

assertParameter() function

Signature:

export declare function assertParameter(aValue: any, aParameterName: string): void;

Parameters

Parameter Type Description
aValue any
aParameterName string

Returns:

void

主页 > @acoustic-content-sdk/schematics-utils > buildDefaultPath

buildDefaultPath() function

构建生成的默认项目路径。

Signature:

export declare function buildDefaultPath(project: WorkspaceProject): string;

Parameters

Parameter Type Description
project WorkspaceProject The project to build the path for.

Returns:

string

Home > @acoustic-content-sdk/schematics-utils > buildRelativePath

buildRelativePath() function

构建从一个文件路径到另一个文件路径的相对路径。

Signature:

export declare function buildRelativePath(from: string, to: string): string;

Parameters

Parameter Type Description
from string
to string

Returns:

string

Home > @acoustic-content-sdk/schematics-utils > byIdentifier

byIdentifier() function

Signature:

export declare function byIdentifier(aName: string): Predicate<Node>;

Parameters

Parameter Type Description
aName string

Returns:

Predicate

首页 > @acoustic-content-sdk/schematics-utils > byName

byName() function

Signature:

export declare function byName(aText: string): Predicate<NamedDeclaration>;

Parameters

Parameter Type Description
aText string

Returns:

Predicate

首页 > @acoustic-content-sdk/schematics-utils > byText

byText() function

Signature:

export declare function byText(aText: string): Predicate<Node>;

Parameters

Parameter Type Description
aText string

Returns:

Predicate

首页 > @acoustic-content-sdk/schematics-utils > byType

byType() function

Signature:

export declare function byType(aType: SyntaxKind): Predicate<Node>;

Parameters

Parameter Type Description
aType SyntaxKind

Returns:

Predicate

首页 > @acoustic-content-sdk/schematics-utils > byTypeAndName

byTypeAndName() function

Signature:

export declare function byTypeAndName(aType: SyntaxKind, aName: string): Predicate<Node>;

Parameters

Parameter Type Description
aType SyntaxKind
aName string

Returns:

Predicate

首页 > @acoustic-content-sdk/schematics-utils > canonicalizeJSON

canonicalizeJSON() function

Signature:

declare function _canonicalize(aData: any): any;

Parameters

Parameter Type Description
aData any

Returns:

any

主页 > @acoustic-content-sdk/schematics-utils > changeSourceFile

changeSourceFile() function

Signature:

export declare function changeSourceFile(aFile: string, aOp: (aFile: string, aContent: SourceFile) => Change[], aHost: Tree): void;

Parameters

Parameter Type Description
aFile string
aOp (aFile: string, aContent: SourceFile) =&gt; Change[]
aHost Tree

Returns:

void

主页 > @acoustic-content-sdk/schematics-utils > copyDir

copyDir() function

从源复制到目标并覆盖目标。 不

多余

export declare function copyDir(aSrc: string, aDst: string, aHost: Tree, aLogger?: Logger): Tree;

Parameters

Parameter Type Description
aSrc string source directory
aDst string target directory
aHost Tree tree
aLogger Logger

_

文件

删除

的 "#_2a9fd764a1b259abf143a83b65110a614345ac93c96f67ba5afbee759a619570">主页 > @acoustic-content-sdk/schematics-utils > createLoggerService

createLoggerService() function

在上下文之上构造记录器服务

签名:

export declare function createLoggerService(context: SchematicContext): LoggerService;

Parameters

Parameter Type Description
context SchematicContext context

返回:

LoggerService 记录器服务

Home @acoustic-content-sdk/schematics-utils > createTransientTree

createTransientTree() function

创建树的临时副本

签名:

export declare function createTransientTree(aRoot: string): Tree;

Parameters

Parameter Type Description
aRoot string root folder for the tree

返回:

Tree

<一个名字=“_63f19c2d06ec4f49255fba01ef7690a3398945b6322d62d943c2ab7562ba2fc9”>

@acoustic-content-sdk/schematics-utils > ensureTrailingSlash

ensureTrailingSlash() function

Signature:

declare function _ensureTrailingSlash(aUrl: string): string;

Parameters

Parameter Type Description
aUrl string

Returns:

string

主页 > @acoustic-content-sdk/schematics-utils > findBootstrapModuleCall

findBootstrapModuleCall() function

签名:

export declare function findBootstrapModuleCall(host: Tree, mainPath: string): CallExpression | null;

Parameters

Parameter Type Description
host Tree
mainPath string

返回:

CallExpression | null

首页 @acoustic-content-sdk/schematics-utils > findBootstrapModulePath

findBootstrapModulePath() function

Signature:

export declare function findBootstrapModulePath(host: Tree, mainPath: string): string;

Parameters

Parameter Type Description
host Tree
mainPath string

Returns:

string

主页 > @acoustic-content-sdk/schematics-utils > findDataDir

findDataDir() function

Signature:

export declare function findDataDir(host: Tree, options?: {
    data?: string;
}): Path;

Parameters

Parameter Type Description
host Tree
options {
data?: string;
}

Returns:

Path

主页 > @acoustic-content-sdk/schematics-utils > findModule

findModule() function

函数用于查找与生成文件路径“最接近”的模块。

Signature:

export declare function findModule(host: Tree, generateDir: string, moduleExt?: string, routingModuleExt?: string): Path;

Parameters

Parameter Type Description
host Tree
generateDir string
moduleExt string
routingModuleExt string

Returns:

Path

Home > @acoustic-content-sdk/schematics-utils > findModuleFromOptions

findModuleFromOptions() function

找到传递给原理图的一组选项引用的模块。

签名:

export declare function findModuleFromOptions(host: Tree, options: ModuleOptions): Path | undefined;

Parameters

Parameter Type Description
host Tree
options ModuleOptions

返回:

路径 | undefined

Home > @acoustic-content-sdk/schematics-utils > findNode

findNode() function

签名:

export declare function findNode(node: Node, kind: SyntaxKind, text: string): Node | null;

Parameters

Parameter Type Description
node Node
kind SyntaxKind
text string

返回:

节点 | null

Home > @acoustic-content-sdk/schematics-utils > findNodes

findNodes() function

在 SyntaxKind 节点的子树中查找 AST 中的所有节点。

签名:

export declare function findNodes(node: Node, kind: SyntaxKind, max?: number, recursive?: boolean): Node[];

Parameters

Parameter Type Description
node Node
kind SyntaxKind
max number The maximum number of items to return.
recursive boolean Continue looking for nodes of kind recursive until end the last child even when node of kind has been found.

返回:

Node[]

所有类型的节点,如果没有找到则返回 []

npm

API Documentation

Home > @acoustic-content-sdk/schematics-utils

schematics-utils package

Helper library to implement schematics.

Classes

Class Description
InsertChange Will add text to the source code.
NoopChange An operation that does nothing.
RemoveChange Will remove text from the source code.
ReplaceChange Will replace text from the source code.

Enumerations

Enumeration Description
Builders
DEP_TYPE
NodeDependencyType
ProjectType

Functions

Function Description
addBootstrapToModule(source, modulePath, classifiedName, importPath) Custom function to insert an export into NgModule. It also imports it.
addDeclarationToModule(source, modulePath, classifiedName, importPath) Custom function to insert a declaration (component, pipe, directive) into NgModule declarations. It also imports the component.
addEntryComponentToModule(source, modulePath, classifiedName, importPath) Custom function to insert an entryComponent into NgModule. It also imports it.
addExportToModule(source, modulePath, classifiedName, importPath) Custom function to insert an export into NgModule. It also imports it.
addImportsToModule(aFile, aModules, aHost) Changes the identified module by adding a couple of imports
addImportToModule(source, modulePath, classifiedName, importPath) Custom function to insert an NgModule into NgModule imports. It also imports the module.
addPackageJsonDependency(tree, dependency)
addProjectToWorkspace(workspace, name, project)
addProviderToModule(source, modulePath, classifiedName, importPath) Custom function to insert a provider into NgModule. It also imports it.
addRouteDeclarationToModule(source, fileToAdd, routeLiteral) Adds a new route declaration to a router module (i.e. has a RouterModule declaration)
addSymbolToNgModuleMetadata(source, ngModulePath, metadataField, symbolName, importPath)
addToWchToolsDependencies(aDeps, aPkg)
assertHasTrailingSlash(aValue)
assertIsEmail(aValue, aName)
assertIsUrl(aValue, aName)
assertIsValidUserName(aValue, aName)
assertNotNull(aValue, aName)
assertParameter(aValue, aParameterName)
buildDefaultPath(project) Build a default project path for generating.
buildRelativePath(from, to) Build a relative path from one file path to another file path.
byIdentifier(aName)
byName(aText)
byText(aText)
byType(aType)
byTypeAndName(aType, aName)
canonicalizeJSON(aData)
changeSourceFile(aFile, aOp, aHost)
copyDir(aSrc, aDst, aHost, aLogger) Copies from source to target and overrides the target. But does not delete extra files
createLoggerService(context) Constructs the logger service on top of the context
createTransientTree(aRoot) Creates a transient copy of a tree
ensureTrailingSlash(aUrl)
findBootstrapModuleCall(host, mainPath)
findBootstrapModulePath(host, mainPath)
findDataDir(host, options)
findModule(host, generateDir, moduleExt, routingModuleExt) Function to find the "closest" module to a generated file's path.
findModuleFromOptions(host, options) Find the module referred by a set of options passed to the schematics.
findNode(node, kind, text)
findNodes(node, kind, max, recursive) Find all nodes from the AST in the subtree of node of SyntaxKind kind.
findPackageJson(aDir)
findProject(workspaceOrHost, options) Locates the workspace project, either from the configured project name, else falls back to the default project
findProjectName(workspaceOrHost, options) Locates the workspace project, either from the configured project name, else falls back to the default project
findSdkVersion(host)
findWchToolsOptions(host, options)
getAppFromConfig(config, appIndexOrName)
getAppModulePath(host, mainPath)
getConfig(host)
getContentOfKeyLiteral(_source, node)
getDecoratorMetadata(source, identifier, module)
getEnvironmentExportName(source) This function returns the name of the environment export whether this export is aliased or not. If the environment file is not imported, then it will return null.
getFirstNgModuleName(source) Given a source file with class(es), find the name of the first class.
getFolderForType(aType)
getMetadataField(node, metadataField)
getPackageJsonDependency(tree, name)
getPackageManager(aHost) Decodes the supported workspace from the host
getProject(workspaceOrHost, projectName)
getProjectTargets(project)
getProjectTargets(workspaceOrHost, projectName)
getRouterModuleDeclaration(source) Returns the RouterModule declaration from NgModule metadata, if any.
getSourceFile(host, path)
getSourceFileFromFileEntry(aEntry)
getSourceNodes(sourceFile) Get all the nodes from a source.
getWorkspace(host)
getWorkspacePath(host)
hasTrailingSlash(aUrl)
insertAfterLastOccurrence(nodes, toInsert, file, fallbackPos, syntaxKind) Insert toInsert after the last occurence of ts.SyntaxKind[nodes[i].kind] or after the last of occurence of syntaxKind if the last occurence is a sub child of SyntaxKind[nodes[i].kind] and save the changes in file.
insertChanges(aChanges, aRecorder)
insertImport(source, fileToEdit, symbolName, fileName, isDefault) Add Import import { symbolName } from fileName if the import doesn't exit already. Assumes fileToEdit can be resolved and accessed.
insertLines(aSource, aInsert)
isImported(source, classifiedName, importPath) Determine if an import already exists.
isValidEmail(aValue)
isValidUrl(aValue)
isValidUserName(aValue)
isWorkspaceProject(project)
isWorkspaceSchema(workspace)
locatePackageJson(aDir) Locates the name of the package.json starting with the current directory
parseLines(aSource)
parseName(path, name)
readBufferOnTree(aHost, aRoot) Constructs the ReadBuffer callback on top of a host
readDirectoryOnTree(aHost, aRoot) Creates a function callback that reads files from a host
readRelativeDirectoryOnTree(aHost, aRoot) Creates a function callback that reads files from a host
readTextFileOnTree(aHost, aRoot) Constructs the ReadTextFile callback on top of a host
readWorkspace(aRoot) Reads a workspace definition based on a root path
removePackageJsonDependency(tree, name)
rxDownload(aUri, aDstFile)
rxFormPost(aUri, aData)
rxGet(aUri)
rxGetJson(aUri)
rxLocateDir(aSrcDir, aPredicate) Locates the directory across the parent chain for which the predicate matches
rxTransformHtmlFile(aName, aOp, aTree) Reads an HMTL from the tree and then transforms it using the given function. If the result is null or undefined, the file will be deleted, else replaced or created.
rxTransformHtmlFragment(aName, aOp, aTree) Reads an HMTL from the tree and then transforms it using the given function. If the result is null or undefined, the file will be deleted, else replaced or created.
rxTransformJsonFile(aName, aOp, aTree) Reads a JSON file from the tree and then transforms it using the given function. If the result is null or undefined, the file will be deleted, else replaced or created.
rxTransformLinesFile(aName, aOp, aTree) Reads a line based file from the tree and then transforms it using the given function. If the result is null or undefined, the file will be deleted, else replaced or created.
rxTransformTextFile(aName, aOp, aTree) Reads a text file from the tree and then transforms it using the given function. If the result is null or undefined, the file will be deleted, else replaced or created.
rxUnzipFromUrl(aTree, aSrcUrl, aDstDir, aSkip)
safeWrite(aPath, aFile, aHost) Overwrites file content, but only if it differs
serializeJson(aData)
serializeLines(aSource)
syncDir(aSrc, aDst, aHost, aLogger)
targetBuildNotFoundError()
updateField(aName, aGenerator, aObj)
updateMinVersion(aName, aMinVersion, aPkg, aType) Updates the package JSON to use at least the given version
updateWorkspace(workspace)
validateApiUrl(aUrl, bValidateWithCredentials) Tests if the API URL is valid and if we have sufficient credentials to access the API
validateCredentials(aApiUrl, aCredentials)
validateHtmlSelector(selector)
validateName(name)
validateProjectName(projectName)
writeFilesOnTree(aHost, aRoot) Returns an operator that writes all file descriptors to disk

Interfaces

Interface Description
AppConfig
AppShellBuilderOptions
BrowserBuilderBaseOptions
BrowserBuilderOptions
BuilderTarget
Change
CliConfig
E2EOptions
ExtractI18nOptions
FileReplacements
Host Copyright Google Inc. All Rights Reserved.Use of this source code is governed by an MIT-style license that can be found in the LICENSE file at https://angular.io/license
LibraryBuilderOptions
LintBuilderOptions
Location
ModuleOptions
NodeDependency
ServeBuilderOptions
ServerBuilderOptions
TestBuilderOptions
WorkspaceProject
WorkspaceSchema
WorkspaceTargets
ZipEntry

Variables

Variable Description
ajaxRequest
configPath
createXHR
htmlSelectorRe
MODULE_EXT
NOOP_LOGGER
ROUTING_MODULE_EXT
rxDeleteFile
rxReadTextFile
rxReadZip Export the function to extract a zip file
rxTmpFile
rxUnlink
TENANT_BASED_URL_REGEXP
VERSION Version and build number of the package
WCHTOOLS_DEPENDENCIES
writeBufferOnTree Constructs a WriteTextFile on top of a host
writeTextFileOnTree Constructs a WriteTextFile on top of a host

Type Aliases

Type Alias Description
AppShellBuilderTarget
BrowserBuilderTarget
E2EBuilderTarget
ExtractI18nBuilderTarget
LibraryBuilderTarget
LintBuilderTarget
OutputHashing
ServeBuilderTarget
ServerBuilderTarget
TestBuilderTarget
TransformCallback
TransformWithoutPath
TransformWithPath

Home > @acoustic-content-sdk/schematics-utils > InsertChange

InsertChange class

Will add text to the source code.

Signature:

export declare class InsertChange implements Change 

Constructors

Constructor Modifiers Description
(constructor)(path, pos, toAdd) Constructs a new instance of the InsertChange class

Properties

Property Modifiers Type Description
description string
order number
path string
pos number
toAdd string

Methods

Method Modifiers Description
apply(host) This method does not insert spaces if there is none in the original string.

Home > @acoustic-content-sdk/schematics-utils > NoopChange

NoopChange class

An operation that does nothing.

Signature:

export declare class NoopChange implements Change 

Properties

Property Modifiers Type Description
description string
order number
path any

Methods

Method Modifiers Description
apply()

Home > @acoustic-content-sdk/schematics-utils > RemoveChange

RemoveChange class

Will remove text from the source code.

Signature:

export declare class RemoveChange implements Change 

Constructors

Constructor Modifiers Description
(constructor)(path, pos, toRemove) Constructs a new instance of the RemoveChange class

Properties

Property Modifiers Type Description
description string
order number
path string

Methods

Method Modifiers Description
apply(host)

Home > @acoustic-content-sdk/schematics-utils > ReplaceChange

ReplaceChange class

Will replace text from the source code.

Signature:

export declare class ReplaceChange implements Change 

Constructors

Constructor Modifiers Description
(constructor)(path, pos, oldText, newText) Constructs a new instance of the ReplaceChange class

Properties

Property Modifiers Type Description
description string
order number
path string

Methods

Method Modifiers Description
apply(host)

Home > @acoustic-content-sdk/schematics-utils > Builders

Builders enum

Signature:

export declare enum Builders 

Enumeration Members

Member Value Description
AppShell &quot;@angular-devkit/build-angular:app-shell&quot;
Browser &quot;@angular-devkit/build-angular:browser&quot;
DevServer &quot;@angular-devkit/build-angular:dev-server&quot;
ExtractI18n &quot;@angular-devkit/build-angular:extract-i18n&quot;
Karma &quot;@angular-devkit/build-angular:karma&quot;
NgPackagr &quot;@angular-devkit/build-ng-packagr:build&quot;
Protractor &quot;@angular-devkit/build-angular:protractor&quot;
Server &quot;@angular-devkit/build-angular:server&quot;
TsLint &quot;@angular-devkit/build-angular:tslint&quot;

Home > @acoustic-content-sdk/schematics-utils > DEP_TYPE

DEP_TYPE enum

Signature:

export declare enum DEP_TYPE 

Enumeration Members

Member Value Description
DEVELOPMENT 2
PEER 0
RUNTIME 1

Home > @acoustic-content-sdk/schematics-utils > NodeDependencyType

NodeDependencyType enum

Signature:

export declare enum NodeDependencyType 

Enumeration Members

Member Value Description
Default &quot;dependencies&quot;
Dev &quot;devDependencies&quot;
Optional &quot;optionalDependencies&quot;
Peer &quot;peerDependencies&quot;

Home > @acoustic-content-sdk/schematics-utils > ProjectType

ProjectType enum

Signature:

export declare enum ProjectType 

Enumeration Members

Member Value Description
Application &quot;application&quot;
Library &quot;library&quot;

Home > @acoustic-content-sdk/schematics-utils > addBootstrapToModule

addBootstrapToModule() function

Custom function to insert an export into NgModule. It also imports it.

Signature:

export declare function addBootstrapToModule(source: SourceFile, modulePath: string, classifiedName: string, importPath: string): Change[];

Parameters

Parameter Type Description
source SourceFile
modulePath string
classifiedName string
importPath string

Returns:

Change[]

Home > @acoustic-content-sdk/schematics-utils > addDeclarationToModule

addDeclarationToModule() function

Custom function to insert a declaration (component, pipe, directive) into NgModule declarations. It also imports the component.

Signature:

export declare function addDeclarationToModule(source: SourceFile, modulePath: string, classifiedName: string, importPath: string): Change[];

Parameters

Parameter Type Description
source SourceFile
modulePath string
classifiedName string
importPath string

Returns:

Change[]

Home > @acoustic-content-sdk/schematics-utils > addEntryComponentToModule

addEntryComponentToModule() function

Warning: This API is now obsolete.

  • Since version 9.0.0 with Ivy, entryComponents is no longer necessary.

Custom function to insert an entryComponent into NgModule. It also imports it.

Signature:

export declare function addEntryComponentToModule(source: SourceFile, modulePath: string, classifiedName: string, importPath: string): Change[];

Parameters

Parameter Type Description
source SourceFile
modulePath string
classifiedName string
importPath string

Returns:

Change[]

Home > @acoustic-content-sdk/schematics-utils > addExportToModule

addExportToModule() function

Custom function to insert an export into NgModule. It also imports it.

Signature:

export declare function addExportToModule(source: SourceFile, modulePath: string, classifiedName: string, importPath: string): Change[];

Parameters

Parameter Type Description
source SourceFile
modulePath string
classifiedName string
importPath string

Returns:

Change[]

Home > @acoustic-content-sdk/schematics-utils > addImportsToModule

addImportsToModule() function

Changes the identified module by adding a couple of imports

Signature:

export declare function addImportsToModule(aFile: string, aModules: {
    [identifier: string]: string;
}, aHost: Tree): void;

Parameters

Parameter Type Description
aFile string the filename
aModules {
[identifier: string]: string;
}
the modules to be added
aHost Tree the tree

Returns:

void

Home > @acoustic-content-sdk/schematics-utils > addImportToModule

addImportToModule() function

Custom function to insert an NgModule into NgModule imports. It also imports the module.

Signature:

export declare function addImportToModule(source: SourceFile, modulePath: string, classifiedName: string, importPath: string): Change[];

Parameters

Parameter Type Description
source SourceFile
modulePath string
classifiedName string
importPath string

Returns:

Change[]

Home > @acoustic-content-sdk/schematics-utils > addPackageJsonDependency

addPackageJsonDependency() function

Signature:

export declare function addPackageJsonDependency(tree: Tree, dependency: NodeDependency): void;

Parameters

Parameter Type Description
tree Tree
dependency NodeDependency

Returns:

void

Home > @acoustic-content-sdk/schematics-utils > addProjectToWorkspace

addProjectToWorkspace() function

Signature:

export declare function addProjectToWorkspace<TProjectType extends ProjectType = ProjectType.Application>(workspace: WorkspaceSchema, name: string, project: WorkspaceProject<TProjectType>): Rule;

Parameters

Parameter Type Description
workspace WorkspaceSchema
name string
project WorkspaceProject&lt;TProjectType&gt;

Returns:

Rule

Home > @acoustic-content-sdk/schematics-utils > addProviderToModule

addProviderToModule() function

Custom function to insert a provider into NgModule. It also imports it.

Signature:

export declare function addProviderToModule(source: SourceFile, modulePath: string, classifiedName: string, importPath: string): Change[];

Parameters

Parameter Type Description
source SourceFile
modulePath string
classifiedName string
importPath string

Returns:

Change[]

Home > @acoustic-content-sdk/schematics-utils > addRouteDeclarationToModule

addRouteDeclarationToModule() function

Adds a new route declaration to a router module (i.e. has a RouterModule declaration)

Signature:

export declare function addRouteDeclarationToModule(source: SourceFile, fileToAdd: string, routeLiteral: string): Change;

Parameters

Parameter Type Description
source SourceFile
fileToAdd string
routeLiteral string

Returns:

Change

Home > @acoustic-content-sdk/schematics-utils > addSymbolToNgModuleMetadata

addSymbolToNgModuleMetadata() function

Signature:

export declare function addSymbolToNgModuleMetadata(source: SourceFile, ngModulePath: string, metadataField: string, symbolName: string, importPath?: string | null): Change[];

Parameters

Parameter Type Description
source SourceFile
ngModulePath string
metadataField string
symbolName string
importPath string &#124; null

Returns:

Change[]

Home > @acoustic-content-sdk/schematics-utils > addToWchToolsDependencies

addToWchToolsDependencies() function

Signature:

export declare function addToWchToolsDependencies(aDeps: string[], aPkg: any): void;

Parameters

Parameter Type Description
aDeps string[]
aPkg any

Returns:

void

Home > @acoustic-content-sdk/schematics-utils > assertHasTrailingSlash

assertHasTrailingSlash() function

Signature:

export declare function assertHasTrailingSlash(aValue: any): string;

Parameters

Parameter Type Description
aValue any

Returns:

string

Home > @acoustic-content-sdk/schematics-utils > assertIsEmail

assertIsEmail() function

Signature:

export declare function assertIsEmail(aValue: any, aName?: string): string;

Parameters

Parameter Type Description
aValue any
aName string

Returns:

string

Home > @acoustic-content-sdk/schematics-utils > assertIsUrl

assertIsUrl() function

Signature:

export declare function assertIsUrl(aValue: any, aName?: string): string;

Parameters

Parameter Type Description
aValue any
aName string

Returns:

string

Home > @acoustic-content-sdk/schematics-utils > assertIsValidUserName

assertIsValidUserName() function

Signature:

export declare function assertIsValidUserName(aValue: any, aName?: string): string;

Parameters

Parameter Type Description
aValue any
aName string

Returns:

string

Home > @acoustic-content-sdk/schematics-utils > assertNotNull

assertNotNull() function

Signature:

export declare function assertNotNull(aValue: any, aName?: string): void;

Parameters

Parameter Type Description
aValue any
aName string

Returns:

void

Home > @acoustic-content-sdk/schematics-utils > assertParameter

assertParameter() function

Signature:

export declare function assertParameter(aValue: any, aParameterName: string): void;

Parameters

Parameter Type Description
aValue any
aParameterName string

Returns:

void

Home > @acoustic-content-sdk/schematics-utils > buildDefaultPath

buildDefaultPath() function

Build a default project path for generating.

Signature:

export declare function buildDefaultPath(project: WorkspaceProject): string;

Parameters

Parameter Type Description
project WorkspaceProject The project to build the path for.

Returns:

string

Home > @acoustic-content-sdk/schematics-utils > buildRelativePath

buildRelativePath() function

Build a relative path from one file path to another file path.

Signature:

export declare function buildRelativePath(from: string, to: string): string;

Parameters

Parameter Type Description
from string
to string

Returns:

string

Home > @acoustic-content-sdk/schematics-utils > byIdentifier

byIdentifier() function

Signature:

export declare function byIdentifier(aName: string): Predicate<Node>;

Parameters

Parameter Type Description
aName string

Returns:

Predicate<Node>

Home > @acoustic-content-sdk/schematics-utils > byName

byName() function

Signature:

export declare function byName(aText: string): Predicate<NamedDeclaration>;

Parameters

Parameter Type Description
aText string

Returns:

Predicate<NamedDeclaration>

Home > @acoustic-content-sdk/schematics-utils > byText

byText() function

Signature:

export declare function byText(aText: string): Predicate<Node>;

Parameters

Parameter Type Description
aText string

Returns:

Predicate<Node>

Home > @acoustic-content-sdk/schematics-utils > byType

byType() function

Signature:

export declare function byType(aType: SyntaxKind): Predicate<Node>;

Parameters

Parameter Type Description
aType SyntaxKind

Returns:

Predicate<Node>

Home > @acoustic-content-sdk/schematics-utils > byTypeAndName

byTypeAndName() function

Signature:

export declare function byTypeAndName(aType: SyntaxKind, aName: string): Predicate<Node>;

Parameters

Parameter Type Description
aType SyntaxKind
aName string

Returns:

Predicate<Node>

Home > @acoustic-content-sdk/schematics-utils > canonicalizeJSON

canonicalizeJSON() function

Signature:

declare function _canonicalize(aData: any): any;

Parameters

Parameter Type Description
aData any

Returns:

any

Home > @acoustic-content-sdk/schematics-utils > changeSourceFile

changeSourceFile() function

Signature:

export declare function changeSourceFile(aFile: string, aOp: (aFile: string, aContent: SourceFile) => Change[], aHost: Tree): void;

Parameters

Parameter Type Description
aFile string
aOp (aFile: string, aContent: SourceFile) =&gt; Change[]
aHost Tree

Returns:

void

Home > @acoustic-content-sdk/schematics-utils > copyDir

copyDir() function

Copies from source to target and overrides the target. But does not delete extra files

Signature:

export declare function copyDir(aSrc: string, aDst: string, aHost: Tree, aLogger?: Logger): Tree;

Parameters

Parameter Type Description
aSrc string source directory
aDst string target directory
aHost Tree tree
aLogger Logger

Returns:

Tree

the tree

Home > @acoustic-content-sdk/schematics-utils > createLoggerService

createLoggerService() function

Constructs the logger service on top of the context

Signature:

export declare function createLoggerService(context: SchematicContext): LoggerService;

Parameters

Parameter Type Description
context SchematicContext context

Returns:

LoggerService

the logger service

Home > @acoustic-content-sdk/schematics-utils > createTransientTree

createTransientTree() function

Creates a transient copy of a tree

Signature:

export declare function createTransientTree(aRoot: string): Tree;

Parameters

Parameter Type Description
aRoot string root folder for the tree

Returns:

Tree

the tree

Home > @acoustic-content-sdk/schematics-utils > ensureTrailingSlash

ensureTrailingSlash() function

Signature:

declare function _ensureTrailingSlash(aUrl: string): string;

Parameters

Parameter Type Description
aUrl string

Returns:

string

Home > @acoustic-content-sdk/schematics-utils > findBootstrapModuleCall

findBootstrapModuleCall() function

Signature:

export declare function findBootstrapModuleCall(host: Tree, mainPath: string): CallExpression | null;

Parameters

Parameter Type Description
host Tree
mainPath string

Returns:

CallExpression | null

Home > @acoustic-content-sdk/schematics-utils > findBootstrapModulePath

findBootstrapModulePath() function

Signature:

export declare function findBootstrapModulePath(host: Tree, mainPath: string): string;

Parameters

Parameter Type Description
host Tree
mainPath string

Returns:

string

Home > @acoustic-content-sdk/schematics-utils > findDataDir

findDataDir() function

Signature:

export declare function findDataDir(host: Tree, options?: {
    data?: string;
}): Path;

Parameters

Parameter Type Description
host Tree
options {
data?: string;
}

Returns:

Path

Home > @acoustic-content-sdk/schematics-utils > findModule

findModule() function

Function to find the "closest" module to a generated file's path.

Signature:

export declare function findModule(host: Tree, generateDir: string, moduleExt?: string, routingModuleExt?: string): Path;

Parameters

Parameter Type Description
host Tree
generateDir string
moduleExt string
routingModuleExt string

Returns:

Path

Home > @acoustic-content-sdk/schematics-utils > findModuleFromOptions

findModuleFromOptions() function

Find the module referred by a set of options passed to the schematics.

Signature:

export declare function findModuleFromOptions(host: Tree, options: ModuleOptions): Path | undefined;

Parameters

Parameter Type Description
host Tree
options ModuleOptions

Returns:

Path | undefined

Home > @acoustic-content-sdk/schematics-utils > findNode

findNode() function

Signature:

export declare function findNode(node: Node, kind: SyntaxKind, text: string): Node | null;

Parameters

Parameter Type Description
node Node
kind SyntaxKind
text string

Returns:

Node | null

Home > @acoustic-content-sdk/schematics-utils > findNodes

findNodes() function

Find all nodes from the AST in the subtree of node of SyntaxKind kind.

Signature:

export declare function findNodes(node: Node, kind: SyntaxKind, max?: number, recursive?: boolean): Node[];

Parameters

Parameter Type Description
node Node
kind SyntaxKind
max number The maximum number of items to return.
recursive boolean Continue looking for nodes of kind recursive until end the last child even when node of kind has been found.

Returns:

Node[]

all nodes of kind, or [] if none is foun

更多

友情链接

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文