diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2022-05-01 15:10:56 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2022-05-01 15:10:56 +0200 |
| commit | e8fcef96681425d431d03fa323747d7d6e61257c (patch) | |
| tree | 0646922304ac38721b2f53485d1c1106d6c300d5 /doc | |
| parent | 3260d5e90a30bbf57e3e5822aa84c23cee0411be (diff) | |
Add typedoc
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/.nojekyll | 1 | ||||
| -rw-r--r-- | doc/README.md | 32 | ||||
| -rw-r--r-- | doc/interfaces/App.Locals.md | 7 | ||||
| -rw-r--r-- | doc/interfaces/App.Platform.md | 7 | ||||
| -rw-r--r-- | doc/interfaces/App.Session.md | 7 | ||||
| -rw-r--r-- | doc/interfaces/App.Stuff.md | 7 | ||||
| -rw-r--r-- | doc/modules.md | 9 | ||||
| -rw-r--r-- | doc/modules/App.md | 30 |
8 files changed, 100 insertions, 0 deletions
diff --git a/doc/.nojekyll b/doc/.nojekyll new file mode 100644 index 0000000..e2ac661 --- /dev/null +++ b/doc/.nojekyll @@ -0,0 +1 @@ +TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
\ No newline at end of file diff --git a/doc/README.md b/doc/README.md new file mode 100644 index 0000000..0d14a40 --- /dev/null +++ b/doc/README.md @@ -0,0 +1,32 @@ +forum / [Exports](modules.md) + +# Forum + +A forum for the year 3000. + +## What you will need to get started + +This project uses [node][node] for most of its development processes. +Once you have node installed according to the instructions there, run +`npm install` from the root of the project. + +For local development serve the page by running `npm run dev` from the +root of the project. + +This project depends on the [forum server][forum-server], so make sure +that's running before starting. + +## Testing + +You can run tests with `npm test`. The tests use `testing-library`, `pact`, +and `jest`. + +Here's some short guidelines: + +- Every component that receives props or changes state should be tested. +- Test expected outcomes, not implementation details. +- Avoid mocking unless it's an external call +- Stores that interact with the API should be tested using pact + +[node]: https://nodejs.org/en/ +[forum-server]: https://gitlab.com/rbdr/forum-server diff --git a/doc/interfaces/App.Locals.md b/doc/interfaces/App.Locals.md new file mode 100644 index 0000000..4f4f400 --- /dev/null +++ b/doc/interfaces/App.Locals.md @@ -0,0 +1,7 @@ +[forum](../README.md) / [Exports](../modules.md) / [App](../modules/App.md) / Locals + +# Interface: Locals + +[App](../modules/App.md).Locals + +The interface that defines `event.locals`, which can be accessed in [hooks](/docs/hooks) (`handle`, `handleError` and `getSession`) and [endpoints](/docs/routing#endpoints). diff --git a/doc/interfaces/App.Platform.md b/doc/interfaces/App.Platform.md new file mode 100644 index 0000000..dc29fdc --- /dev/null +++ b/doc/interfaces/App.Platform.md @@ -0,0 +1,7 @@ +[forum](../README.md) / [Exports](../modules.md) / [App](../modules/App.md) / Platform + +# Interface: Platform + +[App](../modules/App.md).Platform + +If your adapter provides [platform-specific context](/docs/adapters#supported-environments-platform-specific-context) via `event.platform`, you can specify it here. diff --git a/doc/interfaces/App.Session.md b/doc/interfaces/App.Session.md new file mode 100644 index 0000000..600a72b --- /dev/null +++ b/doc/interfaces/App.Session.md @@ -0,0 +1,7 @@ +[forum](../README.md) / [Exports](../modules.md) / [App](../modules/App.md) / Session + +# Interface: Session + +[App](../modules/App.md).Session + +The interface that defines `session`, both as an argument to [`load`](/docs/loading) functions and the value of the [session store](/docs/modules#$app-stores). diff --git a/doc/interfaces/App.Stuff.md b/doc/interfaces/App.Stuff.md new file mode 100644 index 0000000..14f9d50 --- /dev/null +++ b/doc/interfaces/App.Stuff.md @@ -0,0 +1,7 @@ +[forum](../README.md) / [Exports](../modules.md) / [App](../modules/App.md) / Stuff + +# Interface: Stuff + +[App](../modules/App.md).Stuff + +The interface that defines `stuff`, as input or output to [`load`](/docs/loading) or as the value of the `stuff` property of the [page store](/docs/modules#$app-stores). diff --git a/doc/modules.md b/doc/modules.md new file mode 100644 index 0000000..767f5c4 --- /dev/null +++ b/doc/modules.md @@ -0,0 +1,9 @@ +[forum](README.md) / Exports + +# forum + +## Table of contents + +### Namespaces + +- [App](modules/App.md) diff --git a/doc/modules/App.md b/doc/modules/App.md new file mode 100644 index 0000000..f622f15 --- /dev/null +++ b/doc/modules/App.md @@ -0,0 +1,30 @@ +[forum](../README.md) / [Exports](../modules.md) / App + +# Namespace: App + +It's possible to tell SvelteKit how to type objects inside your app by declaring the `App` namespace. By default, a new project will have a file called `src/app.d.ts` containing the following: + +```ts +/// <reference types="@sveltejs/kit" /> + +declare namespace App { + interface Locals {} + + interface Platform {} + + interface Session {} + + interface Stuff {} +} +``` + +By populating these interfaces, you will gain type safety when using `event.locals`, `event.platform`, `session` and `stuff`: + +## Table of contents + +### Interfaces + +- [Locals](../interfaces/App.Locals.md) +- [Platform](../interfaces/App.Platform.md) +- [Session](../interfaces/App.Session.md) +- [Stuff](../interfaces/App.Stuff.md) |