Skip to content

Commit

Permalink
minor tweaks (and version 1.0 prep)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajvincent committed Mar 22, 2024
1 parent 2151a94 commit d76646a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Structures themselves are somewhat opaque in `ts-morph`. The documentation on t

One not-so-little detail: types don't have structures in `ts-morph`. Instead, the `ts-morph` structures present them as serialized strings or writer functions. This means, unless you happen to like writing parsers, your best tool for manipulating types is a regular expression... not a good fit for the job.

I solve this with a completely independent (but not complete) structure classes set, and a new set of "type structure" classes. Where regular structure interfaces specify a `type?: string | WriterFunction` field, I add a `typeStructure: TypeStructures` field. Similarly, `returnType?: string | WriterFunction` has a corresponding `returnTypeStructure: TypeStructures` field.
I solve this with a completely independent structure classes set, and a new set of "type structure" classes. Where regular structure interfaces specify a `type?: string | WriterFunction` field, I add a `typeStructure: TypeStructures` field. Similarly, `returnType?: string | WriterFunction` has a corresponding `returnTypeStructure: TypeStructures` field.

## Guides

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ts-morph-structures",
"version": "0.1.0",
"version": "1.0.0",
"description": "Structure classes for ts-morph, including type structure classes.",
"main": "dist/exports.js",
"typings": "dist/exports.d.ts",
Expand Down

0 comments on commit d76646a

Please sign in to comment.