ozhanefemeral / visual-ts

Generate React & TypeScript code visually.
https://visual-ts.vercel.app
11 stars 2 forks source link

Use TypeScript Compiler API for Creating Interfaces, Types, and Functions #7

Closed ozhanefemeral closed 5 months ago

ozhanefemeral commented 5 months ago

Use TypeScript Compiler API for Creating Interfaces, Types, and Functions

Is your feature request related to a problem? Please describe. Yes, currently we are dealing with strings to create interfaces, types, and functions, which is non-ideal and error-prone. It also makes it harder to use TypeScript's type-checking capabilities.

Describe the solution you'd like We should use the TypeScript Compiler API to create interfaces, types, and functions. Specifically, we should utilize createFunctionDeclaration, createTypeAliasDeclaration, and other relevant factory functions.

Describe alternatives you've considered There shouldn't be any alternative to this.

Additional context The following file needs to be updated:

Checklist