@small-web/kitten-types 1.1.3 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -2
- package/fragments.d.ts +13 -14
- package/global.d.ts +6 -1081
- package/index.d.ts +7 -27
- package/kitten/src/AppDatabase.d.ts +10 -0
- package/kitten/src/AppRepository.d.ts +101 -0
- package/kitten/src/AutomaticUpdates.d.ts +21 -0
- package/kitten/src/Files.d.ts +61 -0
- package/kitten/src/GlobalInternalDatabase.d.ts +22 -0
- package/kitten/src/InternalDatabase.d.ts +7 -0
- package/kitten/src/REPL.d.ts +5 -0
- package/kitten/src/Routes.d.ts +41 -0
- package/kitten/src/Server.d.ts +76 -0
- package/kitten/src/ServerError.d.ts +6 -0
- package/kitten/src/Sessions.d.ts +32 -0
- package/kitten/src/Uploads.d.ts +20 -0
- package/kitten/src/Utils.d.ts +79 -0
- package/kitten/src/cli/commands/db.d.ts +48 -0
- package/kitten/src/cli/commands/deploy.d.ts +16 -0
- package/kitten/src/cli/commands/disable.d.ts +9 -0
- package/kitten/src/cli/commands/enable.d.ts +9 -0
- package/kitten/src/cli/commands/logs.d.ts +15 -0
- package/kitten/src/cli/commands/restart.d.ts +11 -0
- package/kitten/src/cli/commands/run.d.ts +15 -0
- package/kitten/src/cli/commands/serve.d.ts +13 -0
- package/kitten/src/cli/commands/shell.d.ts +1 -0
- package/kitten/src/cli/commands/start.d.ts +9 -0
- package/kitten/src/cli/commands/status.d.ts +15 -0
- package/kitten/src/cli/commands/stop.d.ts +9 -0
- package/kitten/src/cli/commands/uninstall.d.ts +9 -0
- package/kitten/src/cli/commands/update.d.ts +7 -0
- package/kitten/src/cli/index.d.ts +55 -0
- package/kitten/src/cli/lib/WarningBox.d.ts +8 -0
- package/kitten/src/cli/lib/header.d.ts +10 -0
- package/kitten/src/components/SvgSpinner.component.d.ts +9 -0
- package/kitten/src/lib/KittenComponent.d.ts +340 -0
- package/kitten/src/lib/KittenMoji.d.ts +35 -0
- package/kitten/src/lib/KittenPackage.d.ts +56 -0
- package/kitten/src/lib/KittenPage.d.ts +202 -0
- package/kitten/src/lib/Version.d.ts +49 -0
- package/kitten/src/lib/ansi-highlight-html.d.ts +5 -0
- package/kitten/src/lib/components/stateful/CopyButton.component.d.ts +14 -0
- package/kitten/src/lib/components/stateless/copyButton.component.d.ts +21 -0
- package/kitten/src/lib/crypto.d.ts +95 -0
- package/kitten/src/lib/deploy.d.ts +20 -0
- package/kitten/src/lib/ensure.d.ts +28 -0
- package/kitten/src/lib/fragments.d.ts +1 -0
- package/kitten/src/lib/globals.d.ts +10 -0
- package/kitten/src/lib/html.d.ts +61 -0
- package/kitten/src/lib/markdown.d.ts +16 -0
- package/kitten/src/lib/paths.d.ts +25 -0
- package/kitten/src/lib/service-status.d.ts +14 -0
- package/kitten/src/lib/system-exit-codes.d.ts +39 -0
- package/kitten/src/lib/terminal-link.d.ts +24 -0
- package/kitten/src/middleware/authentication.d.ts +8 -0
- package/kitten/src/middleware/index.d.ts +5 -0
- package/kitten/src/middleware/request-and-response-helpers.d.ts +6 -0
- package/kitten/src/middleware/request-log.d.ts +10 -0
- package/kitten/src/middleware/sessions.d.ts +3 -0
- package/kitten/src/middleware/stats.d.ts +8 -0
- package/kitten/src/middleware/trailing-slashes.d.ts +11 -0
- package/kitten/src/middleware/websocket.d.ts +14 -0
- package/kitten/src/routes/HttpRoute.d.ts +16 -0
- package/kitten/src/routes/LazilyLoadedRoute.d.ts +15 -0
- package/kitten/src/routes/PageRoute.d.ts +54 -0
- package/kitten/src/routes/PageSocketRoute.d.ts +42 -0
- package/kitten/src/routes/PostRoute.d.ts +64 -0
- package/kitten/src/routes/StaticRoute.d.ts +17 -0
- package/kitten/src/routes/WebSocketRoute.d.ts +21 -0
- package/kitten/src/routes/lib/validator.d.ts +18 -0
- package/kitten/src/types/fragments.d.ts +14 -0
- package/kitten/src/types/globals.d.ts +1239 -0
- package/kitten/src/types/index.d.ts +12 -0
- package/kitten/src/types/types.d.ts +476 -0
- package/kitten/third-party-libraries-with-missing-type-information/index.d.ts +37 -0
- package/package.json +18 -5
- package/types.d.ts +5 -712
- package/polka/index.d.ts +0 -111
- package/slugify/index.d.ts +0 -246
- /package/{ws → kitten/third-party-libraries-with-missing-type-information/ws}/index.d.ts +0 -0
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@ Type-safety for [Kitten](https://kitten.small-web.org) apps and sites.
|
|
|
4
4
|
|
|
5
5
|
This is a **types-only** package. It declares the global `kitten` namespace (via `declare global`) and exports reusable Kitten types you can use to annotate your own code.
|
|
6
6
|
|
|
7
|
+
The types are automatically generated from the [Kitten source code](https://codeberg.org/kitten/app).
|
|
8
|
+
|
|
7
9
|
## Install
|
|
8
10
|
|
|
9
11
|
```shell
|
|
@@ -33,7 +35,8 @@ How you add language intelligence and static type checking for Kitten to your pr
|
|
|
33
35
|
### JavaScript
|
|
34
36
|
|
|
35
37
|
1. [Install Kitten Types (@small-web/kitten-types)](#install) as a development-time dependency.
|
|
36
|
-
|
|
38
|
+
|
|
39
|
+
2. *Either* add `@ts-check` to the tops of your JavaScript files or [add a jsconfig.json file](https://kitten.small-web.org/reference/#jsconfig-json) to your project to enable type checking.
|
|
37
40
|
|
|
38
41
|
That’s it!
|
|
39
42
|
|
|
@@ -56,7 +59,11 @@ There’s one extra step (compared to JavaScript) when using TypeScript.
|
|
|
56
59
|
|
|
57
60
|
1. [Install Kitten Types (@small-web/kitten-types)](#install) as a development-time dependency.
|
|
58
61
|
|
|
59
|
-
|
|
62
|
+
```shell
|
|
63
|
+
npm install --save-dev @small-web/kitten-types
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
2. [Create a tsconfig.json file.](https://kitten.small-web.org/reference/#tsconfig-json)
|
|
60
67
|
|
|
61
68
|
3. Create a *globals.d.ts* file in your project:
|
|
62
69
|
|
package/fragments.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
Kitten Types (@small-web/kitten-types)
|
|
3
|
+
|
|
4
|
+
Ambient module declarations for Kitten fragment imports
|
|
5
|
+
(*.fragment.html, *.fragment.css, *.fragment.md).
|
|
6
|
+
|
|
7
|
+
Generated from Kitten’s TypeScript source code
|
|
8
|
+
(see kitten/ – regenerated via `npm run sync-types` in the Kitten repository).
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import './kitten/src/types/fragments.d.ts'
|
|
12
|
+
|
|
13
|
+
export {}
|