@kubb/plugin-ts 5.0.9 → 5.0.10

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/dist/index.cjs CHANGED
@@ -1857,7 +1857,7 @@ var compatibility = {
1857
1857
  };
1858
1858
  //#endregion
1859
1859
  //#region package.json
1860
- var version = "5.0.9";
1860
+ var version = "5.0.10";
1861
1861
  //#endregion
1862
1862
  //#region src/resolvers/resolverTs.ts
1863
1863
  /**
package/dist/index.js CHANGED
@@ -1838,7 +1838,7 @@ var compatibility = {
1838
1838
  };
1839
1839
  //#endregion
1840
1840
  //#region package.json
1841
- var version = "5.0.9";
1841
+ var version = "5.0.10";
1842
1842
  //#endregion
1843
1843
  //#region src/resolvers/resolverTs.ts
1844
1844
  /**
package/docs/overview.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # TypeScript
2
2
 
3
- Generates TypeScript types and interfaces from your OpenAPI spec. You get a type for every schema, plus the request, response, and parameter types of each operation.
3
+ The TypeScript plugin generates a type or interface for every schema in your OpenAPI spec, plus the request, response, and parameter types of each operation.
4
4
 
5
- Most other Kubb plugins build on these types. The client, query, mock, and test plugins import them, so add this plugin first.
5
+ Kubb runs this plugin before the plugins that import its types, whatever the order of the `plugins` array.
6
6
 
7
7
  ## Setup
8
8
 
@@ -16,8 +16,14 @@ No other plugins or packages are needed.
16
16
  - `arrayType` writes arrays as `T[]` (default) or `Array<T>`.
17
17
  - `group` splits the output into folders by tag or path. It does not work with `output.mode: 'file'`.
18
18
 
19
+ With the default OpenAPI adapter, `int64` fields are typed as `bigint`, while JSON responses hold numbers. Set `integerType: 'number'` on `adapterOas` for most JSON APIs.
20
+
21
+ See [Options](https://kubb.dev/extensions/kubb-labs/plugin-ts/options) for every option and its default.
22
+
19
23
  ## Example
20
24
 
25
+ The config below generates the types into `src/gen/types`.
26
+
21
27
  ```typescript [kubb.config.ts]
22
28
  import { defineConfig } from 'kubb/config'
23
29
  import { pluginTs } from '@kubb/plugin-ts'
@@ -30,8 +36,3 @@ export default defineConfig({
30
36
  ],
31
37
  })
32
38
  ```
33
-
34
- ## See also
35
-
36
- - [TypeScript](https://www.typescriptlang.org/)
37
- - [TypeScript Compiler API](https://github.com/microsoft/TypeScript/wiki/Using-the-Compiler-API)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-ts",
3
- "version": "5.0.9",
3
+ "version": "5.0.10",
4
4
  "description": "Generate TypeScript types, interfaces, and enums with Kubb. The base plugin other Kubb plugins build on for type safety.",
5
5
  "keywords": [
6
6
  "code-generation",