-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Just tweaking crap * Working on the converter for some reason * Add a nested type test * Bunnnnnn
- Loading branch information
1 parent
8b9a990
commit a354d00
Showing
9 changed files
with
35 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
import * as tdl from '@unmango/tdl'; | ||
import type { Spec } from '@unmango/tdl-es'; | ||
import type { BunFile } from 'bun'; | ||
import ts from 'typescript'; | ||
|
||
export const from: tdl.From<Spec> = async (reader: BunFile): Promise<Spec> => { | ||
const data = await reader.arrayBuffer(); | ||
const content = new TextDecoder().decode(data); | ||
const source = ts.createSourceFile('stdin', content, ts.ScriptTarget.ES2019, undefined, ts.ScriptKind.TS); | ||
source.forEachChild(parseNode); | ||
return await Promise.reject('not implemented'); | ||
}; | ||
|
||
function parseNode(node: ts.Node): void { | ||
throw new Error('not implemented'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,5 @@ types: | |
type: string | ||
numberField: | ||
type: number | ||
booleanField: | ||
type: boolean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export interface TestType { | ||
stringField: string; | ||
numberField: number; | ||
booleanField: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
types: | ||
NestedType: | ||
type: object | ||
fields: | ||
field: | ||
type: string | ||
TestType: | ||
type: object | ||
fields: | ||
nested: | ||
type: NestedType |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export interface NestedType { | ||
field: string; | ||
} | ||
export interface TestType { | ||
nested: NestedType; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters