Skip to content

Commit 785c501

Browse files
committed
feat: setup tsc
1 parent ec3a084 commit 785c501

File tree

5 files changed

+27
-21
lines changed

5 files changed

+27
-21
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/target
22
*.DS_Store
33
**/node_modules
4-
.idea
4+
.idea
5+
reader/ts/src/*.js

reader/ts/index.d.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import {DataType, FlowType, RuntimeFunctionDefinition} from "@code0-tech/sagittarius-graphql-types";
2+
3+
export enum MetaType {
4+
FlowType = 'FlowType',
5+
DataType = 'DataType',
6+
RuntimeFunction = 'RuntimeFunction',
7+
}
8+
9+
export interface Meta {
10+
name: string;
11+
type: MetaType;
12+
data: string[];
13+
}
14+
15+
export interface Feature {
16+
name: string;
17+
dataTypes: DataType[];
18+
flowTypes: FlowType[];
19+
runtimeFunctions: RuntimeFunctionDefinition[];
20+
}

reader/ts/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
"version": "0.0.1",
44
"description": "Reader for Code0-Definitions",
55
"main": "index.js",
6+
"type": "module",
67
"scripts": {
8+
"build": "tsc",
79
"test": "echo \"Error: no test specified\" && exit 1"
810
},
911
"author": "",

reader/ts/src/parser.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
import {Meta, MetaType, Reader} from './reader';
1+
import {Reader} from './reader';
22
import {DataType, FlowType, RuntimeFunctionDefinition} from "@code0-tech/sagittarius-graphql-types";
3-
4-
export interface Feature {
5-
name: string;
6-
dataTypes: DataType[];
7-
flowTypes: FlowType[];
8-
runtimeFunctions: RuntimeFunctionDefinition[];
9-
}
3+
import {Feature, Meta, MetaType} from "../index";
104

115
export const Definition = (rootPath: string): Feature[] => {
126
const meta = Reader(rootPath);

reader/ts/src/reader.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
import * as fs from 'fs';
22
import * as path from 'path';
3-
4-
export enum MetaType {
5-
FlowType = 'FlowType',
6-
DataType = 'DataType',
7-
RuntimeFunction = 'RuntimeFunction',
8-
}
9-
10-
export interface Meta {
11-
name: string;
12-
type: MetaType;
13-
data: string[];
14-
}
3+
import {Meta, MetaType} from "../index";
154

165
export const Reader = (rootPath: string): Meta[] => {
176
const result: Meta[] = [];

0 commit comments

Comments
 (0)