Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(typescript): Basic Dynamic Snippet Generation for Typescript-v2 #5422

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

Schnides123
Copy link
Contributor

@Schnides123 Schnides123 commented Dec 16, 2024

added rough draft code and tests for functions, parameters, comments, and function invocations for TS-v2.

Description

Adds dynamic snippet generation to typescript-v2 generator package

Changes Made

introduces basic endpoint and dynamic snippet generation logic, with basic test coverage

Testing

  • Unit tests added/updated
  • added basic imdb snapshot test cases
  • Manual testing completed
  • verified that imdb snapshot generates correct output and errors, minus import handling

@Schnides123 Schnides123 requested review from amckinney and removed request for dsinghvi December 16, 2024 20:02
generators/typescript-v2/ast/src/ast/Enum.ts Outdated Show resolved Hide resolved
generators/typescript-v2/ast/src/ast/Enum.ts Outdated Show resolved Hide resolved
generators/typescript-v2/ast/src/ast/Enum.ts Outdated Show resolved Hide resolved
generators/typescript-v2/ast/src/ast/Enum.ts Outdated Show resolved Hide resolved
generators/typescript-v2/ast/src/ast/Func.ts Outdated Show resolved Hide resolved
generators/typescript-v2/ast/src/ast/Method.ts Outdated Show resolved Hide resolved
generators/typescript-v2/ast/src/ast/Method.ts Outdated Show resolved Hide resolved
generators/typescript-v2/ast/src/ast/Method.ts Outdated Show resolved Hide resolved
added rough draft code and tests for functions, parameters, comments, and function invocations for TS-v2.

WIP 2: split up methods and subbed snippets code

added stubs for snippets, added really rough implementation for methods and implementation for method invocation

WIP3: fixed the pascal case

fixed pascal case

missed one

there

WIP: it actually runs now

snippet generator spits something out, not sure if you can call it typescript tho. still have to work out imports and some other stuff

updated param

added second write for also printing type
@Schnides123 Schnides123 force-pushed the feat/dynamic-snippets branch from 57c9091 to cf7e6e5 Compare December 18, 2024 17:45
# Conflicts:
#	generators/browser-compatible-base/src/ast/AbstractWriter.ts
#	generators/typescript-v2/ast/src/ast/Comment.ts
#	generators/typescript-v2/ast/src/ast/Func.ts
#	generators/typescript-v2/ast/src/ast/FunctionInvocation.ts
#	generators/typescript-v2/ast/src/ast/Method.ts
#	generators/typescript-v2/ast/src/ast/MethodInvocation.ts
#	generators/typescript-v2/ast/src/ast/Type.ts
#	generators/typescript-v2/ast/src/ast/__test__/__snapshots__/Function.test.ts.snap
#	generators/typescript-v2/ast/src/typescript.ts
#	generators/typescript-v2/dynamic-snippets/src/EndpointSnippetGenerator.ts
Swimburger
Swimburger previously approved these changes Dec 18, 2024
# Conflicts:
#	generators/typescript-v2/ast/src/ast/Function.ts
#	generators/typescript-v2/ast/src/ast/Method.ts
#	generators/typescript-v2/ast/src/ast/Type.ts
#	generators/typescript-v2/ast/src/ast/TypeLiteral.ts
#	generators/typescript-v2/ast/src/ast/__test__/Function.test.ts
#	generators/typescript-v2/ast/src/ast/__test__/Method.test.ts
#	generators/typescript-v2/ast/src/ast/core/AstNode.ts
#	generators/typescript-v2/dynamic-snippets/src/EndpointSnippetGenerator.ts
@Schnides123 Schnides123 changed the title WIP: First draft of functions feat(typescript): Basic Dynamic Snippet Generation for Typescript-v2 Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants