-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Implement JSDocReadonlyTag and others
* Initial commit adding new tags. * Output of `yarn code-generate` * Remove `.only` on test.
- Loading branch information
Showing
10 changed files
with
133 additions
and
97 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { ts } from "@ts-morph/common"; | ||
import { JSDocTag } from "./JSDocTag"; | ||
|
||
/** | ||
* JS doc private tag node. | ||
*/ | ||
export class JSDocPrivateTag extends JSDocTag<ts.JSDocPrivateTag> { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { ts } from "@ts-morph/common"; | ||
import { JSDocTag } from "./JSDocTag"; | ||
|
||
/** | ||
* JS doc protected tag node. | ||
*/ | ||
export class JSDocProtectedTag extends JSDocTag<ts.JSDocProtectedTag> { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { ts } from "@ts-morph/common"; | ||
import { JSDocTag } from "./JSDocTag"; | ||
|
||
/** | ||
* JS doc public tag node. | ||
*/ | ||
export class JSDocPublicTag extends JSDocTag<ts.JSDocPublicTag> { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { ts } from "@ts-morph/common"; | ||
import { JSDocTag } from "./JSDocTag"; | ||
|
||
/** | ||
* JS doc readonly tag node. | ||
*/ | ||
export class JSDocReadonlyTag extends JSDocTag<ts.JSDocReadonlyTag> { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { expect } from "chai"; | ||
import { Project } from "../../Project"; | ||
|
||
describe("tests for issue #844", () => { | ||
it("should not throw an error getting structure", () => { | ||
const project = new Project({ useInMemoryFileSystem: true }); | ||
const sourceFile = project.createSourceFile("src/file.ts", `class MyClass { | ||
constructor(renderer: MYNAMESPACE.Renderer); | ||
/** | ||
* A flag | ||
* @member {boolean} | ||
* @readonly | ||
*/ | ||
readonly isActive: boolean; | ||
}`); | ||
|
||
expect(() => sourceFile.getStructure()).to.not.throw(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters