dsherret / dsherret/ts-morph

IndexSignatureDeclarationStructure::keyType can't be a WriterFunction?

Open
#1,466 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
6.2k
Forks
238
Avg merge
2m
Merged PRs (30d)
1

Description

**Describe the bug**

Version: 20.0.0

https://github.com/dsherret/ts-morph/blob/a90dc9118166ec484ea486a9d952c08d761dc6bc/packages/ts-morph/src/structures/interface/IndexSignatureDeclarationStructure.ts#L12

This is a place where a type field can't be a `WriterFunction`. Most others (`TypedNodeStructure`, `ReturnTypedNodeStructure`, etc.) can.

**To Reproduce**

Not applicable. Without the type definition, I can't write code to set this.

[TS-AST-Viewer link](https://ts-ast-viewer.com/#code/C4TwDgpgBAglC8UDeAoKUDaBrCIBcUAzsAE4CWAdgOYC6BARgPaMA2EAhhSgL5A)

Contributor guide

Open the contributing guide

Research direction

Start with packages/ts-morph/src/structures/interface/IndexSignatureDeclarationStructure.ts at the linked keyType definition, then compare it with the other type fields mentioned in the issue, such as TypedNodeStructure and ReturnTypedNodeStructure. Done means the keyType definition supports WriterFunction consistently with those fields and the relevant type checks pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.