You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/overmind-website/guides/beginner/06_typescript.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
# Typescript
2
2
3
-
Overmind is written in Typescript and it is written with a focus on your keeping as little time as possible helping Typescript understand what your app is all about. Typescript will spend a lot more time helping you. If you are not a Typescript developer Overmind is a really great project to start learning it as you will get the most out of the little typing you have to do.
3
+
Overmind is written in Typescript and it is written with a focus on you dedicating as little time as possible to help Typescript understand what your app is all about. Typescript will spend a lot more time helping you. If you are not a Typescript developer Overmind is a really great project to start learning it as you will get the most out of the little typing you have to do.
4
4
5
5
## Two typing approaches
6
6
7
7
### 1. Declare module
8
8
9
-
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.
9
+
The most straightforward 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 hardcore 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.
h(Notice, null, "The Overmind documentation is written for implicit typing. That means whenever you see a type import directly from the Overmind package, you should rather import from your own defined types")
37
+
h(Notice, null, "The Overmind documentation is written for implicit typing. That means whenever you see a type import directly from the Overmind package, you should rather import from your own defined types.")
38
38
```
39
39
40
40
## Linting
@@ -43,13 +43,13 @@ When you are using TSLint it is important that you use the official [Microsoft E
43
43
44
44
## Actions
45
45
46
-
The action type takes either an input type, an output type or both.
46
+
The action type takes either an input type, an output type, or both.
47
47
48
48
```marksy
49
49
h(Example, { name: "guide/typescript/action" })
50
50
```
51
51
52
-
You also have **async** version of this type. You use this when you want to define an **async** function, which implicitly returns a promise, or a function that explicitly returns a promise.
52
+
You also have an **async** version of this type. You use this when you want to define an **async** function, which implicitly returns a promise, or a function that explicitly returns a promise.
Operators is like the **Action** type, it can take an optional input, but it always produces an output. By default the output of an operator is the same as the input.
61
+
Operators is like the **Action** type: it can take an optional input, but it always produces an output. By default the output of an operator is the same as the input.
The **Operator** type is used to type all operators. The type arguments you give to **Operator**has to match the specific operator you use though. So for example if you type a **mutate** operator with a different output than the input:
67
+
The **Operator** type is used to type all operators. The type arguments you give to **Operator**have to match the specific operator you use though. So for example if you type a **mutate** operator with a different output than the input:
0 commit comments