معرفی شرکت ها


ts-simple-ast-21.0.4


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

TypeScript compiler wrapper for static analysis and code manipulation.
ویژگی مقدار
سیستم عامل -
نام فایل ts-simple-ast-21.0.4
نام ts-simple-ast
نسخه کتابخانه 21.0.4
نگهدارنده ['dsherret']
ایمیل نگهدارنده ['dsherret@gmail.com']
نویسنده David Sherret
ایمیل نویسنده -
آدرس صفحه اصلی git+https://github.com/dsherret/ts-simple-ast.git
آدرس اینترنتی https://github.com/dsherret/ts-simple-ast#readme
مجوز MIT
ts-simple-ast ============= [![npm version](https://badge.fury.io/js/ts-simple-ast.svg)](https://badge.fury.io/js/ts-simple-ast) [![Build Status](https://travis-ci.org/dsherret/ts-simple-ast.svg?branch=master)](https://travis-ci.org/dsherret/ts-simple-ast) [![Coverage Status](https://coveralls.io/repos/dsherret/ts-simple-ast/badge.svg?branch=master&service=github)](https://coveralls.io/github/dsherret/ts-simple-ast?branch=master) [![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges) [TypeScript](https://github.com/Microsoft/TypeScript) Compiler API wrapper. Provides a simple way to navigate and manipulate TypeScript and JavaScript code. ## NOTICE - LIBRARY RENAMED! ts-simple-ast has been renamed to [ts-morph](https://www.npmjs.com/package/ts-morph). ## Library Development - Progress Update (06 January 2019) View information on breaking changes in [breaking-changes.md](breaking-changes.md). This library is still under early active development. Most common code manipulation/generation use cases are implemented, but there's still a lot of work to do. Please open an issue if you find a feature missing or bug that isn't in the issue tracker. ### Report View a generated report on what nodes have been wrapped in the [wrapped-nodes.md](wrapped-nodes.md) file. ## Documentation Work in progress: https://dsherret.github.io/ts-simple-ast/ ## Getting Started 1. [Installing](https://dsherret.github.io/ts-simple-ast/) 2. [Instantiating](https://dsherret.github.io/ts-simple-ast/setup/) 3. [Adding source files](https://dsherret.github.io/ts-simple-ast/setup/adding-source-files) 4. [Getting source files](https://dsherret.github.io/ts-simple-ast/navigation/getting-source-files) 5. [Navigating](https://dsherret.github.io/ts-simple-ast/navigation/example) 6. [Manipulating](https://dsherret.github.io/ts-simple-ast/manipulation/) ## Example ```ts import { Project } from "ts-simple-ast"; // initialize const project = new Project({ // Optionally specify compiler options, tsconfig.json, virtual file system, and more here. // If you initialize with a tsconfig.json, then it will automatically populate the project // with the associated source files. // Read more: https://dsherret.github.io/ts-simple-ast/setup/ }); // add source files project.addExistingSourceFiles("src/**/*.ts"); const myClassFile = project.createSourceFile("src/MyClass.ts", "export class MyClass {}"); const myEnumFile = project.createSourceFile("src/MyEnum.ts", { enums: [{ name: "MyEnum", isExported: true, members: [{ name: "member" }] }] }); // get information from ast const myClass = myClassFile.getClassOrThrow("MyClass"); myClass.getName(); // returns: "MyClass" myClass.hasExportKeyword(); // returns: true myClass.isDefaultExport(); // returns: false // manipulate ast const myInterface = myClassFile.addInterface({ name: "IMyInterface", isExported: true, properties: [{ name: "myProp", type: "number" }] }); myClass.rename("NewName"); myClass.addImplements(myInterface.getName()); myClass.addProperty({ name: "myProp", initializer: "5" }); project.getSourceFileOrThrow("src/ExistingFile.ts").delete(); // asynchronously save all the changes above project.save(); // get underlying compiler node from the typescript AST from any node const compilerNode = myClassFile.compilerNode; ``` Or navigate existing compiler nodes created with the TypeScript compiler (the `ts` named export is the TypeScript compiler): ```ts ignore-error: 1109 import { createWrappedNode, ClassDeclaration, ts } from "ts-simple-ast"; // some code that creates a class declaration using the ts object const classNode: ts.ClassDeclaration = ...; // create and use a wrapped node const classDec = createWrappedNode(classNode) as ClassDeclaration; const firstProperty = classDec.getProperties()[0]; // ... do more stuff here ... ``` ## Resources * [AST Viewers](https://dsherret.github.io/ts-simple-ast/setup/ast-viewers)


نیازمندی

مقدار نام
^2.0.2 @dsherret/to-absolute-glob
^7.2.2 code-block-writer
^7.0.0 fs-extra
^3.1.0 glob-parent
^8.0.1 globby
^1.0.0 is-negated-glob
^2.1.0 multimatch
^1.9.0 tslib
^3.0.1 typescript


زبان مورد نیاز

مقدار نام
8.12.0 Npm


نحوه نصب


نصب پکیج tgz ts-simple-ast-21.0.4:

    npm install ts-simple-ast-21.0.4.tgz