ajvincent / ajvincent/es-membrane

ts-morph-structures: Missing type structure classes

Open
#290 0 comments 0 reactions 1 assignee Claimed by @ajvincent View on GitHub
Dominant language
JavaScript
Stars
118
Forks
13
PR merge metrics
No merged PRs in 30d

Description

- [ ] Update `JSDocTagImpl` to support type structures for type-expressioned tags
- [x] NamedTupleMember
- [x] In [source/base/TypeStructureKind.ts](./source/base/TypeStructureKind.ts), append a new enum member of `TypeStructureKind`
- [x] Import what you need:
- [x] from ts-morph:
- [x] `type CodeBlockWriter`,
- [x] `type WriterFunction`
- [x] From `../../../snapshot/source/exports.js`:
- [x] `type TypeStructureKind`
- [x] `type StructureImpls`
- [x] `type TypeStructures`
- [x] From `../../../snapshot/source/internal-exports.js`:
- [x] `type CloneableTypeStructure`
- [x] `STRUCTURE_AND_TYPES_CHILDREN`
- [x] one of the type structure bases from `internal-exports.js`:
- `TypeStructuresBase`
- [x] Implement your type structure class
- [x] `@example` TSDoc tag above the type structure class to describe its output
- [x] extending your type structure base
- [x] `readonly kind: TypeStructureKind = TypeStructureKind;`
- [x] References to other type structures should be instances of existing type structure classes
- [x] References to regular structures should be instances of existing structure classes
- [x] `#writerFunction(writer: CodeBlockWriter): void;`
- [x] `readonly writerFunction: WriterFunction = this.#writerFunction.bind(this);`
- [x] Implement `public static clone()`
- [x] The source parameter should be of the same type as your type alias
- [x] Use `TypeStructureClassesMap.clone()` (or `cloneArray()`) and your decorators' `cloneFoo(source, target)` functions where practical
- [x] Implement `[STRUCTURE_AND_TYPES_CHILDREN]` to iterate over type structures you own
- [x] `/** @internal */`
- [x] Add a `satisfies` constraint for your class for the static clone method: `ConditionalTypedStructureImpl satisfies CloneableTypeStructure;` for example
- [x] Add your class to the `TypeStructureClassesMap`, with your key being your `TypeStructureKind`
- [x] Add your class to the [`TypeStructures` union](./source/structures/type/TypeStructures.ts)
- [x] Update [convertTypeNode.ts](./source/bootstrap/convertTypeNode.ts) for the new structure and its matching type node.
- [x] Do a build, so the new type structure class arrives in the final snapshot
- [x] Update [the type structures test file in the final snapshot directory](../stage_2_snapshot/spec-snapshot/source/structures/TypeStructures.ts) as you see fit.
- [x] Update [docs/guides/TypeStructures.md](/docs/guides/TypeStructures.md) to include the new type structure.
- [x] OptionalTypeNode
- [x] In [source/base/TypeStructureKind.ts](./source/base/TypeStructureKind.ts), append a new enum member of `TypeStructureKind`
- [x] Import what you need:
- [x] from ts-morph:
- [x] `type CodeBlockWriter`,
- [x] `type WriterFunction`
- [x] From `../../../snapshot/source/exports.js`:
- [x] `type TypeStructureKind`
- [x] `type StructureImpls`
- [x] `type TypeStructures`
- [x] From `../../../snapshot/source/internal-exports.js`:
- [x] `type CloneableTypeStructure`
- [x] `STRUCTURE_AND_TYPES_CHILDREN`
- [x] one of the type structure bases from `internal-exports.js`:
- `TypeStructuresBase`
- [x] Implement your type structure class
- [x] `@example` TSDoc tag above the type structure class to describe its output
- [x] extending your type structure base
- [x] `readonly kind: TypeStructureKind = TypeStructureKind;`
- [x] References to other type structures should be instances of existing type structure classes
- [x] References to regular structures should be instances of existing structure classes
- [x] `#writerFunction(writer: CodeBlockWriter): void;`
- [x] `readonly writerFunction: WriterFunction = this.#writerFunction.bind(this);`
- [x] Implement `public static clone()`
- [x] The source parameter should be of the same type as your type alias
- [x] Use `TypeStructureClassesMap.clone()` (or `cloneArray()`) and your decorators' `cloneFoo(source, target)` functions where practical
- [x] Implement `[STRUCTURE_AND_TYPES_CHILDREN]` to iterate over type structures you own
- [x] `/** @internal */`
- [x] Add a `satisfies` constraint for your class for the static clone method: `ConditionalTypedStructureImpl satisfies CloneableTypeStructure;` for example
- [x] Add your class to the `TypeStructureClassesMap`, with your key being your `TypeStructureKind`
- [x] Add your class to the [`TypeStructures` union](./source/structures/type/TypeStructures.ts)
- [x] Update [convertTypeNode.ts](./source/bootstrap/convertTypeNode.ts) for the new structure and its matching type node.
- [x] Do a build, so the new type structure class arrives in the final snapshot
- [x] Update [the type structures test file in the final snapshot directory](../stage_2_snapshot/spec-snapshot/source/structures/TypeStructures.ts) as you see fit.
- [x] Update [docs/guides/TypeStructures.md](/docs/guides/TypeStructures.md) to include the new type structure.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.