diff --git a/backend/Makefile b/backend/Makefile index 9cfa335..da0e254 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -118,3 +118,7 @@ uml: plantuml.jar install-just: @echo "Installing just" @curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin + +.PHONY: types +types: + tygo generate \ No newline at end of file diff --git a/backend/tygo.yaml b/backend/tygo.yaml new file mode 100644 index 0000000..54c1e8f --- /dev/null +++ b/backend/tygo.yaml @@ -0,0 +1,9 @@ +packages: + - path: "ttime/internal/types" + output_path: "../frontend/src/Types/goTypes.ts" + type_mappings: + time.Time: "string /* RFC3339 */" + null.String: "null | string" + null.Bool: "null | boolean" + uuid.UUID: "string /* uuid */" + uuid.NullUUID: "null | string /* uuid */" diff --git a/frontend/.eslintrc.cjs b/frontend/.eslintrc.cjs index 447a464..1051c03 100644 --- a/frontend/.eslintrc.cjs +++ b/frontend/.eslintrc.cjs @@ -9,7 +9,7 @@ module.exports = { 'plugin:react-hooks/recommended', 'plugin:prettier/recommended', ], - ignorePatterns: ['dist', '.eslintrc.cjs', 'tailwind.config.js', 'postcss.config.js', 'jest.config.cjs'], + ignorePatterns: ['dist', '.eslintrc.cjs', 'tailwind.config.js', 'postcss.config.js', 'jest.config.cjs', 'goTypes.ts'], parser: '@typescript-eslint/parser', plugins: ['react-refresh', 'prettier'], rules: {