Skip to content

Commit 82ee480

Browse files
hipertrackerchristianalfoni
authored andcommitted
Update 03_typescript.md
fix brokenlinks to editing code snippets
1 parent a0d9f13 commit 82ee480

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/overmind-website/guides/intermediate/03_typescript.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,28 @@ Overmind is written in Typescript and it is written with a focus on your keeping
77
The most straight forward way to type your application is to use the **declare module** approach. This will work for most applications, but might make you feel uncomfortable as a harcore Typescripter. The reason is that we are overriding an internal type, meaning that you can only have one instance of Overmind running inside your application.
88

99
```marksy
10-
h(Example, { name: "guide/typescript/declare.ts" })
10+
h(Example, { name: "guide/typescript/declare" })
1111
```
1212

1313
Now you can import any type directly from Overmind and it will understand the configuration of your application. Even the operators are typed.
1414

1515
```marksy
16-
h(Example, { name: "guide/typescript/declare_imports.ts" })
16+
h(Example, { name: "guide/typescript/declare_imports" })
1717
```
1818

1919
## Explicit typing
2020
You can also explicitly type your application. This gives more flexibility.
2121

2222
```marksy
23-
h(Example, { name: "guide/typescript/explicit.ts" })
23+
h(Example, { name: "guide/typescript/explicit" })
2424
```
2525

2626
You only have to set up these types once, where you instantiate Overmind. That means if you use multiple namespaced configuration you still only create one set of types, as shown above.
2727

2828
Now you only have to make sure that you import your types from this file, instead of directly from the Overmind package.
2929

3030
```marksy
31-
h(Example, { name: "guide/typescript/explicit_import.ts" })
31+
h(Example, { name: "guide/typescript/explicit_import" })
3232
```
3333

3434
```marksy
@@ -41,7 +41,7 @@ h(Notice, null, "The Overmind documentation is written for implicit typing. That
4141
The action type takes either no arguments or a single argument. If you give no arguments to the action it will be typed as not expecting an argument at all. When you do type with an argument that is the type of the **value** on the context. This value is populated when you call the action on the Overmind instance.
4242

4343
```marksy
44-
h(Example, { name: "guide/typescript/action.ts" })
44+
h(Example, { name: "guide/typescript/action" })
4545
```
4646

4747

@@ -100,4 +100,4 @@ h(Example, { name: "guide/typescript/operatorinfer_solution" })
100100

101101

102102
#### Summary
103-
Typescript is not functional, it is object oriented and it is very difficult to make it work with this kind of APIs. We have high hopes though cause Typescript is evolving rapidly and Microsoft is dedicated to make this an awesome type system for JavaScript. If you got mad Typescript skills, please contact us to iterate on the type system and make this stuff work :-)
103+
Typescript is not functional, it is object oriented and it is very difficult to make it work with this kind of APIs. We have high hopes though cause Typescript is evolving rapidly and Microsoft is dedicated to make this an awesome type system for JavaScript. If you got mad Typescript skills, please contact us to iterate on the type system and make this stuff work :-)

0 commit comments

Comments
 (0)