Skip to content

Commit

Permalink
strict ts mode
Browse files Browse the repository at this point in the history
added a temporary any cast: vlcn-io/vlcn-orm#45
  • Loading branch information
tantaman committed Aug 13, 2022
1 parent 8bc9489 commit d7069a8
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tasks:
- init: npm install
command: npm run serve
command: npm run start
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@aphro/absurd-sql-connector": "^0.2.1",
"@aphro/react": "^1.1.0",
"@aphro/runtime-ts": "^0.3.5",
"@types/react-dom": "^18.0.6",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
12 changes: 8 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import TodoList from "./domain/TodoList.js";

createResolver()
.then((resolver) => {
// TODO: why did this type break?
const ctx = context(anonymous(), resolver as any);
start(ctx);
})
Expand Down Expand Up @@ -41,6 +42,6 @@ async function setup(ctx: Context): Promise<TodoList> {
async function start(ctx: Context) {
const list = await setup(ctx);

const root = createRoot(document.getElementById("container"));
const root = createRoot(document.getElementById("container")!);
root.render(<App list={list} />);
}
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"moduleResolution": "node",
"rootDir": "./",
"allowJs": true,
"jsx": "react"
"jsx": "react",
"strict": true
},
"include": ["./src/"]
}

0 comments on commit d7069a8

Please sign in to comment.