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
This effectively boils down to the many pitfalls of TypeScript. Common issues seems to be:
Determining the right type for a plain object. Usually Record<string, unknown>.
Using InexactPartial appropriately.
Not writing foo?: T | undefined in function signatures; only for object properties does the distinction between foo?: T and foo?: T | undefined matter.
Writing effective tests.
The process of diffing versions.
Getting started with the helper types.
etc.
Ideally if lints could be find for these it'd ease the burden into becoming more automated.
The text was updated successfully, but these errors were encountered:
Setting up VSCode with ESLint/TypeScript/other recommended extensions.
Why we do export {} in every new file that doesn't have an import/export. (To make sure the files aren't automatically ambient)
Running tests.
How to run tsc to generate type definitions from Foundry source. This is technically a part of diffing versions but I listed it here to make sure I won't forget.
A quick guide on namespaces. They're a pretty unusual thing in TypeScript these days which I actually think is a bit of a shame.
How to find a good first issue.
Explanation of the advanced patterns in the repo for things like Mixins
Possibly a brief explanation of the helper types.
What Foundry documentation to copy over. For example you probably shouldn't copy over /* ************** */ comments.
What documentation to add. For example if something is only initialized during a certain hook.
Common Foundry TSDoc mappings e.g. Object<T> -> Record<string, T> or so on.
When to use MaybePromise.
How to provide the defaults of something, e.g. a function parameter.
This effectively boils down to the many pitfalls of TypeScript. Common issues seems to be:
Record<string, unknown>
.InexactPartial
appropriately.foo?: T | undefined
in function signatures; only for object properties does the distinction betweenfoo?: T
andfoo?: T | undefined
matter.Ideally if lints could be find for these it'd ease the burden into becoming more automated.
The text was updated successfully, but these errors were encountered: