Skip to content

Commit 5242185

Browse files
committed
Minor docs change
1 parent 5939e20 commit 5242185

File tree

5 files changed

+342
-249
lines changed

5 files changed

+342
-249
lines changed

docs/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@
1010
},
1111
"dependencies": {
1212
"@algolia/client-search": "^4.19.1",
13-
"@astrojs/preact": "^2.2.1",
14-
"@astrojs/react": "^2.2.1",
13+
"@astrojs/preact": "^2.2.2",
14+
"@astrojs/react": "^2.2.2",
1515
"@docsearch/css": "^3.5.1",
1616
"@docsearch/react": "^3.5.1",
17-
"@types/react": "^18.2.16",
17+
"@types/react": "^18.2.20",
1818
"@types/react-dom": "^18.2.7",
19-
"astro": "^2.9.2",
20-
"preact": "^10.16.0",
19+
"astro": "^2.10.9",
20+
"preact": "^10.17.0",
2121
"react": "^18.2.0",
2222
"react-dom": "^18.2.0",
23-
"sass": "^1.64.1"
23+
"sass": "^1.65.1"
2424
},
2525
"devDependencies": {
26-
"@astrojs/sitemap": "^2.0.1",
27-
"@types/node": "^20.4.9",
26+
"@astrojs/sitemap": "^2.0.2",
27+
"@types/node": "^20.5.0",
2828
"html-escaper": "^3.0.3",
2929
"typescript": "^5.1.6"
3030
}

docs/src/content/docs/advanced.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ However, APIs are language-agnostic, and may contain a different syntax style fr
182182
183183
Instead, treat “consistency” in a more holistic sense, recognizing that preserving the API schema as-written is better than adhering to language-specific style conventions.
184184
185-
### Enable `noUncheckedIndexAccess` in your tsconfig.json
185+
### Enable `noUncheckedIndexedAccess` in your tsconfig.json
186186
187-
openapi-typescript generates a `Record` for `additionalProperties` and tries to avoid adding a `undefined` union to the index signature. However, this may result in unsafe property access in TypeScript, **unless** the compiler flag `noUncheckedIndexAccess` is set. If set, TypeScript will error when you try to access a property that might not be set.
187+
openapi-typescript generates a `Record` for `additionalProperties` and tries to avoid adding a `undefined` union to the index signature. However, this may result in unsafe property access in TypeScript, **unless** the compiler flag `noUncheckedIndexedAccess` is set ([docs](/advanced#enable-nouncheckedindexaccess-in-your-tsconfigjson)). If set, TypeScript will error when you try to access a property that might not be set.
188188
189189
### Be specific in your schema
190190

docs/src/content/docs/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ type ErrorResponse = paths["/my/endpoint"]["get"]["responses"][500]["content"]["
6464

6565
> **Tip**
6666
>
67-
> Using TypeScript’s bracket notation (`obj["property"]`) is a safe way to access all names in your OpenAPI schema, even the ones that aren’t “TypeScript-safe”
67+
> Enabling [noUncheckedIndexedAccess](https://www.typescriptlang.org/tsconfig#noUncheckedIndexedAccess) in `tsconfig.json` can go along way to improve type safety ([read more](/advanced#enable-nouncheckedindexaccess-in-your-tsconfigjson))
6868
6969
From here, you can use these types for any of the following (but not limited to):
7070

packages/openapi-typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"devDependencies": {
6969
"@types/degit": "^2.8.3",
7070
"@types/js-yaml": "^4.0.5",
71-
"@types/node": "^20.4.9",
71+
"@types/node": "^20.5.0",
7272
"degit": "^2.8.4",
7373
"del-cli": "^5.0.0",
7474
"esbuild": "^0.19.2",

0 commit comments

Comments
 (0)