Skip to content

Commit ee532ee

Browse files
Jakob Schlanstedtwerererer
authored andcommitted
docs(note_create): improve clarification of type system
1 parent b82d756 commit ee532ee

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

apps/client/src/services/note_create.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,18 @@ import dateNoteService from "../services/date_notes.js";
1414

1515
/**
1616
* Creating notes through note_create can have multiple kinds of valid
17-
* arguments. This type hierchary is checking if the arguments are correct.
17+
* arguments. This type hierarchy is checking if the arguments are correct.
1818
* Later the functions of note_create are overloaded based to reflect these types,
1919
* which define valid arguments.
2020
*
2121
* Theoretically: If the typechecking returns no errors, then the inputs
2222
* create a valid state, given that the types are defined correctly.
2323
* Through the Curry–Howard correspondence, this acts as a proof system
2424
* proving that the arguments will produce a correct state at compile time.
25-
* that just means that if the code type-checks, then the provided options
26-
* represent a valid state. To represent the theoretical bases `type` is
27-
* used instead of `interface`
25+
* That means when typescript does type-checks, then the arguments will
26+
* definitely represent a valid state.
27+
*
28+
* To represent the theoretical bases `type` is used instead of `interface`
2829
*
2930
* * Hierarchy of general to specific categories(hypernyms -> hyponyms):
3031
*

0 commit comments

Comments
 (0)