From 81c47c65cf96e703834b217b9c6faaa52fc75f41 Mon Sep 17 00:00:00 2001 From: Anthony DePasquale Date: Fri, 26 Apr 2024 13:20:44 +0200 Subject: [PATCH] Fix spelling, punctuation, grammar --- CONTRIBUTING.md | 2 +- README.md | 2 +- scripts/add-deno-type-references.js | 2 +- scripts/generate-site-examples.js | 2 +- site/docs/examples/DELETE/0010-single-row.mdx | 2 +- site/docs/examples/INSERT/0010-single-row.mdx | 2 +- site/docs/examples/INSERT/0020-multiple-rows.mdx | 2 +- .../docs/examples/INSERT/0030-returning-data.mdx | 2 +- .../docs/examples/INSERT/0040-complex-values.mdx | 2 +- .../examples/INSERT/0050-insert-subquery.mdx | 2 +- .../examples/JOIN/0010-simple-inner-join.mdx | 2 +- .../examples/JOIN/0020-aliased-inner-join.mdx | 2 +- site/docs/examples/JOIN/0030-complex-join.mdx | 2 +- site/docs/examples/JOIN/0040-subquery-join.mdx | 2 +- .../examples/SELECT/0010-a-single-column.mdx | 2 +- .../examples/SELECT/0020-column-with-a-table.mdx | 2 +- .../examples/SELECT/0030-multiple-columns.mdx | 2 +- site/docs/examples/SELECT/0040-aliases.mdx | 2 +- .../examples/SELECT/0050-complex-selections.mdx | 2 +- site/docs/examples/SELECT/0051-not-null.mdx | 6 +++--- .../docs/examples/SELECT/0060-function-calls.mdx | 2 +- site/docs/examples/SELECT/0070-distinct.mdx | 2 +- site/docs/examples/SELECT/0080-distinct-on.mdx | 2 +- site/docs/examples/SELECT/0090-all-columns.mdx | 2 +- .../SELECT/0100-all-columns-of-a-table.mdx | 2 +- site/docs/examples/SELECT/0110-nested-array.mdx | 4 ++-- site/docs/examples/SELECT/0120-nested-object.mdx | 6 +++--- site/docs/examples/UPDATE/0010-single-row.mdx | 2 +- .../docs/examples/UPDATE/0020-complex-values.mdx | 2 +- .../examples/WHERE/0010-simple-where-clause.mdx | 2 +- site/docs/examples/WHERE/0020-where-in.mdx | 2 +- site/docs/examples/WHERE/0030-object-filter.mdx | 2 +- site/docs/examples/WHERE/0040-or-where.mdx | 2 +- .../WHERE/0050-conditional-where-calls.mdx | 2 +- .../examples/WHERE/0060-complex-where-clause.mdx | 2 +- .../transactions/0010-simple-transaction.mdx | 2 +- site/docs/generating-types.md | 4 ++-- site/docs/getting-started/_types.mdx | 6 +++--- site/docs/intro.mdx | 8 ++++---- site/docs/recipes/0001-relations.md | 4 ++-- site/docs/recipes/0002-data-types.md | 16 ++++++++-------- site/docs/recipes/0006-expressions.md | 2 +- site/src/components/SectionFeatures/index.tsx | 8 ++++---- site/src/pages/index.tsx | 4 ++-- src/dialect/dialect-adapter-base.ts | 2 +- src/dynamic/dynamic.ts | 2 +- src/expression/expression-builder.ts | 2 +- src/helpers/mysql.ts | 6 +++--- src/helpers/postgres.ts | 8 ++++---- src/plugin/camel-case/camel-case-plugin.ts | 4 ++-- src/query-builder/delete-query-builder.ts | 6 +++--- src/query-builder/function-module.ts | 8 ++++---- src/query-builder/insert-query-builder.ts | 6 +++--- src/query-builder/select-query-builder.ts | 12 ++++++------ src/query-builder/update-query-builder.ts | 6 +++--- test/node/src/with.test.ts | 2 +- 56 files changed, 99 insertions(+), 99 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d7248491d..4990c0732 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,7 +15,7 @@ There are quite a few guidelines to keep in mind: * Kysely should have zero dependencies. -* Kysely should work in all javascript environments (node.js, deno & modern browsers), +* Kysely should work in all JavaScript environments (node.js, deno & modern browsers), even though the main focus is node.js. * Everything is immutable. diff --git a/README.md b/README.md index 9181c4419..6831a7910 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ If you start using Kysely and can't find something you'd want to use, please ope # Getting started Please visit our documentation site [kysely.dev](https://kysely.dev) to get started. We also have a comprehensive -API documentation hosted [here](https://kysely-org.github.io/kysely-apidoc/) but you can access the same +API documentation hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation in your IDE by hovering over a class/method/property/whatever. # Contributors diff --git a/scripts/add-deno-type-references.js b/scripts/add-deno-type-references.js index 827907700..400a09682 100644 --- a/scripts/add-deno-type-references.js +++ b/scripts/add-deno-type-references.js @@ -1,6 +1,6 @@ /** * This scripts adds a `/// ` directive - * at the beginning of each ESM javascript file so that they work with + * at the beginning of each ESM JavaScript file so that they work with * deno. */ diff --git a/scripts/generate-site-examples.js b/scripts/generate-site-examples.js index b20244087..c72ccb348 100644 --- a/scripts/generate-site-examples.js +++ b/scripts/generate-site-examples.js @@ -209,7 +209,7 @@ function buildMoreExamplesMarkdown(category) { const lines = [ ':::info More examples', - 'The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/)', + 'The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/),', 'but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always', 'just one hover away!', '', diff --git a/site/docs/examples/DELETE/0010-single-row.mdx b/site/docs/examples/DELETE/0010-single-row.mdx index 922cf9678..eb5f6ee43 100644 --- a/site/docs/examples/DELETE/0010-single-row.mdx +++ b/site/docs/examples/DELETE/0010-single-row.mdx @@ -20,7 +20,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/INSERT/0010-single-row.mdx b/site/docs/examples/INSERT/0010-single-row.mdx index b5085b83a..422e41b45 100644 --- a/site/docs/examples/INSERT/0010-single-row.mdx +++ b/site/docs/examples/INSERT/0010-single-row.mdx @@ -20,7 +20,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/INSERT/0020-multiple-rows.mdx b/site/docs/examples/INSERT/0020-multiple-rows.mdx index c8a638778..817660dbb 100644 --- a/site/docs/examples/INSERT/0020-multiple-rows.mdx +++ b/site/docs/examples/INSERT/0020-multiple-rows.mdx @@ -23,7 +23,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/INSERT/0030-returning-data.mdx b/site/docs/examples/INSERT/0030-returning-data.mdx index 5ad8f6cee..a7bf0eaff 100644 --- a/site/docs/examples/INSERT/0030-returning-data.mdx +++ b/site/docs/examples/INSERT/0030-returning-data.mdx @@ -23,7 +23,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/INSERT/0040-complex-values.mdx b/site/docs/examples/INSERT/0040-complex-values.mdx index 9fd9ccd9f..6b1143df6 100644 --- a/site/docs/examples/INSERT/0040-complex-values.mdx +++ b/site/docs/examples/INSERT/0040-complex-values.mdx @@ -22,7 +22,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/INSERT/0050-insert-subquery.mdx b/site/docs/examples/INSERT/0050-insert-subquery.mdx index c8db4687f..3d12b1f72 100644 --- a/site/docs/examples/INSERT/0050-insert-subquery.mdx +++ b/site/docs/examples/INSERT/0050-insert-subquery.mdx @@ -22,7 +22,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/JOIN/0010-simple-inner-join.mdx b/site/docs/examples/JOIN/0010-simple-inner-join.mdx index 17ce8e62e..59ff6fe98 100644 --- a/site/docs/examples/JOIN/0010-simple-inner-join.mdx +++ b/site/docs/examples/JOIN/0010-simple-inner-join.mdx @@ -20,7 +20,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/JOIN/0020-aliased-inner-join.mdx b/site/docs/examples/JOIN/0020-aliased-inner-join.mdx index a16d0fb25..ffed6eb9a 100644 --- a/site/docs/examples/JOIN/0020-aliased-inner-join.mdx +++ b/site/docs/examples/JOIN/0020-aliased-inner-join.mdx @@ -20,7 +20,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/JOIN/0030-complex-join.mdx b/site/docs/examples/JOIN/0030-complex-join.mdx index 564277e82..7c63dd7c2 100644 --- a/site/docs/examples/JOIN/0030-complex-join.mdx +++ b/site/docs/examples/JOIN/0030-complex-join.mdx @@ -28,7 +28,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/JOIN/0040-subquery-join.mdx b/site/docs/examples/JOIN/0040-subquery-join.mdx index 2bc1ee0a1..0963ff981 100644 --- a/site/docs/examples/JOIN/0040-subquery-join.mdx +++ b/site/docs/examples/JOIN/0040-subquery-join.mdx @@ -20,7 +20,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/SELECT/0010-a-single-column.mdx b/site/docs/examples/SELECT/0010-a-single-column.mdx index 005bd0771..4c97ce659 100644 --- a/site/docs/examples/SELECT/0010-a-single-column.mdx +++ b/site/docs/examples/SELECT/0010-a-single-column.mdx @@ -20,7 +20,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/SELECT/0020-column-with-a-table.mdx b/site/docs/examples/SELECT/0020-column-with-a-table.mdx index 9035e2344..40d033c85 100644 --- a/site/docs/examples/SELECT/0020-column-with-a-table.mdx +++ b/site/docs/examples/SELECT/0020-column-with-a-table.mdx @@ -20,7 +20,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/SELECT/0030-multiple-columns.mdx b/site/docs/examples/SELECT/0030-multiple-columns.mdx index 45cfebb64..b8d53f51d 100644 --- a/site/docs/examples/SELECT/0030-multiple-columns.mdx +++ b/site/docs/examples/SELECT/0030-multiple-columns.mdx @@ -20,7 +20,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/SELECT/0040-aliases.mdx b/site/docs/examples/SELECT/0040-aliases.mdx index 980b20282..ee64e1774 100644 --- a/site/docs/examples/SELECT/0040-aliases.mdx +++ b/site/docs/examples/SELECT/0040-aliases.mdx @@ -20,7 +20,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/SELECT/0050-complex-selections.mdx b/site/docs/examples/SELECT/0050-complex-selections.mdx index 4714a0a68..786ffb5cc 100644 --- a/site/docs/examples/SELECT/0050-complex-selections.mdx +++ b/site/docs/examples/SELECT/0050-complex-selections.mdx @@ -21,7 +21,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/SELECT/0051-not-null.mdx b/site/docs/examples/SELECT/0051-not-null.mdx index 528856ddb..15ad39fde 100644 --- a/site/docs/examples/SELECT/0051-not-null.mdx +++ b/site/docs/examples/SELECT/0051-not-null.mdx @@ -5,8 +5,8 @@ title: 'Not null' # Not null Sometimes you can be sure something's not null but Kysely isn't able to infer -it. For example calling `where('last_name', 'is not', null)` doesn't make -`last_name` not null in the result type but unless you have other where statements +it. For example, calling `where('last_name', 'is not', null)` doesn't make +`last_name` not null in the result type, but unless you have other where statements, you can be sure it's never null. Kysely has a couple of helpers for dealing with these cases: `$notNull()` and `$narrowType`. @@ -26,7 +26,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/SELECT/0060-function-calls.mdx b/site/docs/examples/SELECT/0060-function-calls.mdx index b5b82bc32..1ce3bc0f6 100644 --- a/site/docs/examples/SELECT/0060-function-calls.mdx +++ b/site/docs/examples/SELECT/0060-function-calls.mdx @@ -22,7 +22,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/SELECT/0070-distinct.mdx b/site/docs/examples/SELECT/0070-distinct.mdx index 2b834d286..5b3c98aea 100644 --- a/site/docs/examples/SELECT/0070-distinct.mdx +++ b/site/docs/examples/SELECT/0070-distinct.mdx @@ -20,7 +20,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/SELECT/0080-distinct-on.mdx b/site/docs/examples/SELECT/0080-distinct-on.mdx index eddcd673f..5fe2a69ac 100644 --- a/site/docs/examples/SELECT/0080-distinct-on.mdx +++ b/site/docs/examples/SELECT/0080-distinct-on.mdx @@ -18,7 +18,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/SELECT/0090-all-columns.mdx b/site/docs/examples/SELECT/0090-all-columns.mdx index a9e40d313..4125695c7 100644 --- a/site/docs/examples/SELECT/0090-all-columns.mdx +++ b/site/docs/examples/SELECT/0090-all-columns.mdx @@ -20,7 +20,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/SELECT/0100-all-columns-of-a-table.mdx b/site/docs/examples/SELECT/0100-all-columns-of-a-table.mdx index c614c7178..809e39fb8 100644 --- a/site/docs/examples/SELECT/0100-all-columns-of-a-table.mdx +++ b/site/docs/examples/SELECT/0100-all-columns-of-a-table.mdx @@ -20,7 +20,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/SELECT/0110-nested-array.mdx b/site/docs/examples/SELECT/0110-nested-array.mdx index 5c27f4e02..628bbe12c 100644 --- a/site/docs/examples/SELECT/0110-nested-array.mdx +++ b/site/docs/examples/SELECT/0110-nested-array.mdx @@ -11,7 +11,7 @@ use the `jsonArrayFrom` helper to fetch person's pets along with the person's id Please keep in mind that the helpers under the `kysely/helpers` folder, including `jsonArrayFrom`, are not guaranteed to work with third party dialects. In order for them to work, the dialect must automatically parse the `json` data type into -javascript JSON values like objects and arrays. Some dialects might simply return +JavaScript JSON values like objects and arrays. Some dialects might simply return the data as a JSON string. In these cases you can use the built in `ParseJSONResultsPlugin` to parse the results. @@ -29,7 +29,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/SELECT/0120-nested-object.mdx b/site/docs/examples/SELECT/0120-nested-object.mdx index 576342bab..d4c47394e 100644 --- a/site/docs/examples/SELECT/0120-nested-object.mdx +++ b/site/docs/examples/SELECT/0120-nested-object.mdx @@ -9,9 +9,9 @@ helpers for fetching nested objects and arrays in a single query. In this exampl use the `jsonObjectFrom` helper to fetch person's favorite pet along with the person's id. Please keep in mind that the helpers under the `kysely/helpers` folder, including -`jsonObjectFrom`, are not guaranteed to work with 3rd party dialects. In order for +`jsonObjectFrom`, are not guaranteed to work with third-party dialects. In order for them to work, the dialect must automatically parse the `json` data type into -javascript JSON values like objects and arrays. Some dialects might simply return +JavaScript JSON values like objects and arrays. Some dialects might simply return the data as a JSON string. In these cases you can use the built in `ParseJSONResultsPlugin` to parse the results. @@ -29,7 +29,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/UPDATE/0010-single-row.mdx b/site/docs/examples/UPDATE/0010-single-row.mdx index cf478cf32..a70b9e13d 100644 --- a/site/docs/examples/UPDATE/0010-single-row.mdx +++ b/site/docs/examples/UPDATE/0010-single-row.mdx @@ -20,7 +20,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/UPDATE/0020-complex-values.mdx b/site/docs/examples/UPDATE/0020-complex-values.mdx index 0af4af00a..c1eedb3ce 100644 --- a/site/docs/examples/UPDATE/0020-complex-values.mdx +++ b/site/docs/examples/UPDATE/0020-complex-values.mdx @@ -21,7 +21,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/WHERE/0010-simple-where-clause.mdx b/site/docs/examples/WHERE/0010-simple-where-clause.mdx index b3e8a7911..5511332ec 100644 --- a/site/docs/examples/WHERE/0010-simple-where-clause.mdx +++ b/site/docs/examples/WHERE/0010-simple-where-clause.mdx @@ -20,7 +20,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/WHERE/0020-where-in.mdx b/site/docs/examples/WHERE/0020-where-in.mdx index ece41d1dd..9ccfa561b 100644 --- a/site/docs/examples/WHERE/0020-where-in.mdx +++ b/site/docs/examples/WHERE/0020-where-in.mdx @@ -20,7 +20,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/WHERE/0030-object-filter.mdx b/site/docs/examples/WHERE/0030-object-filter.mdx index 0236dde6c..87c9bf62a 100644 --- a/site/docs/examples/WHERE/0030-object-filter.mdx +++ b/site/docs/examples/WHERE/0030-object-filter.mdx @@ -21,7 +21,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/WHERE/0040-or-where.mdx b/site/docs/examples/WHERE/0040-or-where.mdx index 34f5c4209..842cc0b17 100644 --- a/site/docs/examples/WHERE/0040-or-where.mdx +++ b/site/docs/examples/WHERE/0040-or-where.mdx @@ -22,7 +22,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/WHERE/0050-conditional-where-calls.mdx b/site/docs/examples/WHERE/0050-conditional-where-calls.mdx index 441ba3e11..02d531d0a 100644 --- a/site/docs/examples/WHERE/0050-conditional-where-calls.mdx +++ b/site/docs/examples/WHERE/0050-conditional-where-calls.mdx @@ -20,7 +20,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/WHERE/0060-complex-where-clause.mdx b/site/docs/examples/WHERE/0060-complex-where-clause.mdx index 876d9aa54..410f7479b 100644 --- a/site/docs/examples/WHERE/0060-complex-where-clause.mdx +++ b/site/docs/examples/WHERE/0060-complex-where-clause.mdx @@ -21,7 +21,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/examples/transactions/0010-simple-transaction.mdx b/site/docs/examples/transactions/0010-simple-transaction.mdx index 514b1dc07..7262c1c74 100644 --- a/site/docs/examples/transactions/0010-simple-transaction.mdx +++ b/site/docs/examples/transactions/0010-simple-transaction.mdx @@ -22,7 +22,7 @@ import { :::info More examples -The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/) +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away! diff --git a/site/docs/generating-types.md b/site/docs/generating-types.md index 734b64249..12b8fa61a 100644 --- a/site/docs/generating-types.md +++ b/site/docs/generating-types.md @@ -4,10 +4,10 @@ To work with Kysely, you're required to provide a database schema type definitio In many cases, defining your database schema definitions manually is good enough. -However, when building production applications, its best to stay aligned with the +However, when building production applications, it's best to stay aligned with the database schema, by automatically generating the database schema type definitions. -There are several ways to do this using 3rd party libraries: +There are several ways to do this using third-party libraries: - [kysely-codegen](https://github.com/RobinBlomberg/kysely-codegen) - This library generates Kysely database schema type definitions by connecting to and introspecting diff --git a/site/docs/getting-started/_types.mdx b/site/docs/getting-started/_types.mdx index a2bde2695..e6b555b39 100644 --- a/site/docs/getting-started/_types.mdx +++ b/site/docs/getting-started/_types.mdx @@ -90,9 +90,9 @@ might differ in naming convention, internal order, etc. Find out more at ["Gener :::info Runtime types -Kysely only deals with types in the typescript level. The runtime javascript types are decided -by the underlying 3rd party driver such as `pg` or `mysql2` and it's up to you to select the correct -typescript types in the database interface. Kysely never touches the runtime output types in +Kysely only deals with types in the TypeScript level. The runtime JavaScript types are decided +by the underlying third-party driver such as `pg` or `mysql2` and it's up to you to select the correct +TypeScript types in the database interface. Kysely never touches the runtime output types in any way. Find out more at ["Data types"](https://kysely.dev/docs/recipes/data-types). ::: diff --git a/site/docs/intro.mdx b/site/docs/intro.mdx index c4ea6f423..3107070cd 100644 --- a/site/docs/intro.mdx +++ b/site/docs/intro.mdx @@ -7,20 +7,20 @@ import { DemoVideo } from '@site/src/components/DemoVideo' # Introduction Kysely (pronounced “Key-Seh-Lee”) is a type-safe and autocompletion-friendly TypeScript SQL query builder. Inspired by Knex. Mainly developed for [node.js](https://nodejs.org/en/) but also -runs on all other javascript environments like [deno](https://deno.land/) and [bun](https://bun.sh/). +runs on all other JavaScript environments like [deno](https://deno.land/) and [bun](https://bun.sh/). Kysely makes sure you only refer to tables and columns that are visible to the part of the query you're writing. The result type only has the selected columns with correct types and aliases. As an added bonus you get autocompletion for all that stuff. -As shown in the gif above, through the pure magic of modern typescript, Kysely is even able to parse the alias given to `pet.name` and add the `pet_name` column to the result row type. Kysely is able to infer column names, aliases and types from selected subqueries, joined subqueries, `with` statements and pretty much anything you can think of. +As shown in the gif above, through the pure magic of modern TypeScript, Kysely is even able to parse the alias given to `pet.name` and add the `pet_name` column to the result row type. Kysely is able to infer column names, aliases and types from selected subqueries, joined subqueries, `with` statements and pretty much anything you can think of. Of course there are cases where things cannot be typed at compile time, and Kysely offers escape hatches for these situations. See the [sql template tag](https://kysely-org.github.io/kysely-apidoc/interfaces/Sql.html) and the [DynamicModule](https://kysely-org.github.io/kysely-apidoc/classes/DynamicModule.html#ref) for more info. All API documentation is written in the typing files and you can simply hover over the module, class or method you're using to see it in your IDE. The same documentation is also hosted [here](https://kysely-org.github.io/kysely-apidoc/). -If you start using Kysely and can't find something you'd want to use, please open an issue or join our [discord server](https://discord.gg/xyBJ3GwvAm). +If you start using Kysely and can't find something you'd want to use, please open an issue or join our [Discord server](https://discord.gg/xyBJ3GwvAm). ## Looking for help? -If you start using Kysely and can't find something you'd want to use, please [open an issue](https://github.com/kysely-org/kysely/issues) or [join our discord server](https://discord.gg/xyBJ3GwvAm). +If you start using Kysely and can't find something you'd want to use, please [open an issue](https://github.com/kysely-org/kysely/issues) or [join our Discord server](https://discord.gg/xyBJ3GwvAm). diff --git a/site/docs/recipes/0001-relations.md b/site/docs/recipes/0001-relations.md index 0e3d0c0f3..f3e55336c 100644 --- a/site/docs/recipes/0001-relations.md +++ b/site/docs/recipes/0001-relations.md @@ -18,7 +18,7 @@ This recipe is supported on MySQL versions starting from 8.0.14. This is due to PostgreSQL and MySQL have rich JSON support through their `json` data types and functions. `pg` and `mysql2`, the node drivers, automatically parse returned `json` columns as json objects. With the combination of these two things, we can write some super efficient queries with nested relations. :::info Parsing JSON -The built in `SqliteDialect` and some 3rd party dialects don't parse the returned JSON columns to objects automatically. +The built in `SqliteDialect` and some third-party dialects don't parse the returned JSON columns to objects automatically. Not even if they use `PostgreSQL` or `MySQL` under the hood! Parsing is handled (or not handled) by the database driver that Kysely has no control over. If your JSON columns get returned as strings, you can use the `ParseJSONResultsPlugin`: @@ -97,7 +97,7 @@ These helpers are included in Kysely and you can import them from the `helpers` import { jsonArrayFrom, jsonObjectFrom } from 'kysely/helpers/postgres' ``` -MySQL and SQLite versions of the helpers are slightly different but you can use them the same way. You can import them like this: +MySQL and SQLite versions of the helpers are slightly different, but you can use them the same way. You can import them like this: ```ts import { jsonArrayFrom, jsonObjectFrom } from 'kysely/helpers/mysql' diff --git a/site/docs/recipes/0002-data-types.md b/site/docs/recipes/0002-data-types.md index 6f81c30fa..7a70b0819 100644 --- a/site/docs/recipes/0002-data-types.md +++ b/site/docs/recipes/0002-data-types.md @@ -3,23 +3,23 @@ When talking about data types in Kysely we need to make a distinction between the two kinds of types: 1. Typescript types -2. Runtime javascript types +2. Runtime JavaScript types ## Typescript types -In Kysely, you only define typescript types for your tables and columns. Since typescript is entirely a compile-time concept, typescript types __can't__ affect runtime javascript types. If you define your column to be a `string` in typescript but the database returns a `number`, the runtime type doesn't magically change to `string`. You'll see a `string` in the typescript code, but observe a number when you run the program. +In Kysely, you only define TypeScript types for your tables and columns. Since TypeScript is entirely a compile-time concept, TypeScript types __can't__ affect runtime JavaScript types. If you define your column to be a `string` in TypeScript but the database returns a `number`, the runtime type doesn't magically change to `string`. You'll see a `string` in the TypeScript code, but observe a number when you run the program. :::info -It's up to **you** to select correct typescript types for your columns based on what the driver returns. +It's up to **you** to select correct TypeScript types for your columns based on what the driver returns. ::: -## Runtime javascript types +## Runtime JavaScript types -The database driver, such as `pg` or `mysql2`, decides the runtime javascript types the queries return. Kysely never touches the runtime types the driver returns. In fact, Kysely doesn't touch the data returned by the driver in any way. It simply executes the query and returns whatever the driver returns. An exception to this rule is when you use a plugin like `CamelCasePlugin`, in which case Kysely does change the column names. +The database driver, such as `pg` or `mysql2`, decides the runtime JavaScript types the queries return. Kysely never touches the runtime types the driver returns. In fact, Kysely doesn't touch the data returned by the driver in any way. It simply executes the query and returns whatever the driver returns. An exception to this rule is when you use a plugin like `CamelCasePlugin`, in which case Kysely does change the column names. -You need to read the underlying driver's documentation or otherwise figure out what the driver returns and then align the typescript types to match them. +You need to read the underlying driver's documentation or otherwise figure out what the driver returns and then align the TypeScript types to match them. -### Configuring runtime javascript types +### Configuring runtime JavaScript types Most drivers provide a way to change the returned types. For example `pg` returns `bigint` and `numeric` types as strings by default, but often you want to configure it to return numbers instead. @@ -75,6 +75,6 @@ export const db = new Kysely({ ## Type generators -There are 3rd party type generators such as [kysely-codegen](https://github.com/RobinBlomberg/kysely-codegen) and [kanel-kysely](https://kristiandupont.github.io/kanel/kanel-kysely.html) that automatically generate typescript types based on the database schema. Find out more at ["Generating types"](https://kysely.dev/docs/generating-types). +There are third-party type generators such as [kysely-codegen](https://github.com/RobinBlomberg/kysely-codegen) and [kanel-kysely](https://kristiandupont.github.io/kanel/kanel-kysely.html) that automatically generate TypeScript types based on the database schema. Find out more at ["Generating types"](https://kysely.dev/docs/generating-types). If these tools generate a type that doesn't match the runtime type you observe, please refer to their documentation or open an issue in their github. Kysely has no control over these libraries. \ No newline at end of file diff --git a/site/docs/recipes/0006-expressions.md b/site/docs/recipes/0006-expressions.md index b9dbaabcb..4e3ec0634 100644 --- a/site/docs/recipes/0006-expressions.md +++ b/site/docs/recipes/0006-expressions.md @@ -147,7 +147,7 @@ The above helper is not very type-safe. The following code would compile, but fa const bigFatFailure = await db .selectFrom('movie') // <-- "person" table is not in context! .selectAll('movie') - .where(hasDogNamed('Doggo')) // <-- but we're refering to "person.id" in our helper.. + .where(hasDogNamed('Doggo')) // <-- but we're referring to "person.id" in our helper .execute() ``` diff --git a/site/src/components/SectionFeatures/index.tsx b/site/src/components/SectionFeatures/index.tsx index 4f3e0348b..c2c95f2ba 100644 --- a/site/src/components/SectionFeatures/index.tsx +++ b/site/src/components/SectionFeatures/index.tsx @@ -14,8 +14,8 @@ const FeatureList: FeatureItem[] = [ description: ( <> - Kysely let's you write type-safe SQL queries. This eliminates entire - classes of errors and let's you sleep peacefully at night. + Kysely lets you write type-safe SQL queries. This eliminates entire + classes of errors and lets you sleep peacefully at night. ), }, @@ -25,7 +25,7 @@ const FeatureList: FeatureItem[] = [ description: ( <> Kysely is a light abstraction layer over SQL. This makes it easy to - reason about performance, and reduces the amount of concepts you need to + reason about performance, and reduces the number of concepts you need to learn to be proficient with the library. ), @@ -46,7 +46,7 @@ const FeatureList: FeatureItem[] = [ description: ( <> PostgreSQL, MySQL, or SQLite? We've got you covered. There's also a - growing ecosystem of 3rd party dialects, including PlanetScale, D3, + growing ecosystem of third-party dialects, including PlanetScale, D3, SurrealDB, and more. Learn more. ), diff --git a/site/src/pages/index.tsx b/site/src/pages/index.tsx index 4e99d131d..88466a216 100644 --- a/site/src/pages/index.tsx +++ b/site/src/pages/index.tsx @@ -50,7 +50,7 @@ function HomepageHeader() { href="https://github.com/kysely-org/kysely" className="button button--secondary button--md button--block" > - View on Github + View on GitHub @@ -203,7 +203,7 @@ function SectionQuotes() { >

What the internet is saying

-

Developers are loving Kysely for it's simplicity and power.

+

Developers are loving Kysely for its simplicity and power.

{ /** * Creates a `cast(expr as dataType)` expression. * - * Since Kysely can't know the mapping between javascript and database types, + * Since Kysely can't know the mapping between JavaScript and database types, * you need to provide both explicitly. * * ### Examples diff --git a/src/helpers/mysql.ts b/src/helpers/mysql.ts index ebe7f8508..95470f1bc 100644 --- a/src/helpers/mysql.ts +++ b/src/helpers/mysql.ts @@ -10,7 +10,7 @@ import { Simplify } from '../util/type-utils.js' * A MySQL helper for aggregating a subquery into a JSON array. * * NOTE: This helper is only guaranteed to fully work with the built-in `MysqlDialect`. - * While the produced SQL is compatible with all MySQL databases, some 3rd party dialects + * While the produced SQL is compatible with all MySQL databases, some third-party dialects * may not parse the nested JSON into arrays. In these cases you can use the built in * `ParseJSONResultsPlugin` to parse the results. * @@ -66,7 +66,7 @@ export function jsonArrayFrom( * The subquery must only return one row. * * NOTE: This helper is only guaranteed to fully work with the built-in `MysqlDialect`. - * While the produced SQL is compatible with all MySQL databases, some 3rd party dialects + * While the produced SQL is compatible with all MySQL databases, some third-party dialects * may not parse the nested JSON into objects. In these cases you can use the built in * `ParseJSONResultsPlugin` to parse the results. * @@ -120,7 +120,7 @@ export function jsonObjectFrom( * The MySQL `json_object` function. * * NOTE: This helper is only guaranteed to fully work with the built-in `MysqlDialect`. - * While the produced SQL is compatible with all MySQL databases, some 3rd party dialects + * While the produced SQL is compatible with all MySQL databases, some third-party dialects * may not parse the nested JSON into objects. In these cases you can use the built in * `ParseJSONResultsPlugin` to parse the results. * diff --git a/src/helpers/postgres.ts b/src/helpers/postgres.ts index d74a50531..e7d406fb6 100644 --- a/src/helpers/postgres.ts +++ b/src/helpers/postgres.ts @@ -17,7 +17,7 @@ import { Simplify } from '../util/type-utils.js' * Please keep in mind that the helpers under the `kysely/helpers` folder, including * `jsonArrayFrom`, are not guaranteed to work with third party dialects. In order for * them to work, the dialect must automatically parse the `json` data type into - * javascript JSON values like objects and arrays. Some dialects might simply return + * JavaScript JSON values like objects and arrays. Some dialects might simply return * the data as a JSON string. In these cases you can use the built in `ParseJSONResultsPlugin` * to parse the results. * @@ -72,9 +72,9 @@ export function jsonArrayFrom( * use the `jsonObjectFrom` helper to fetch person's favorite pet along with the person's id. * * Please keep in mind that the helpers under the `kysely/helpers` folder, including - * `jsonObjectFrom`, are not guaranteed to work with 3rd party dialects. In order for + * `jsonObjectFrom`, are not guaranteed to work with third-party dialects. In order for * them to work, the dialect must automatically parse the `json` data type into - * javascript JSON values like objects and arrays. Some dialects might simply return + * JavaScript JSON values like objects and arrays. Some dialects might simply return * the data as a JSON string. In these cases you can use the built in `ParseJSONResultsPlugin` * to parse the results. * @@ -119,7 +119,7 @@ export function jsonObjectFrom( * The PostgreSQL `json_build_object` function. * * NOTE: This helper is only guaranteed to fully work with the built-in `PostgresDialect`. - * While the produced SQL is compatible with all PostgreSQL databases, some 3rd party dialects + * While the produced SQL is compatible with all PostgreSQL databases, some third-party dialects * may not parse the nested JSON into objects. In these cases you can use the built in * `ParseJSONResultsPlugin` to parse the results. * diff --git a/src/plugin/camel-case/camel-case-plugin.ts b/src/plugin/camel-case/camel-case-plugin.ts index 1ff1bfaa5..5ca2dca03 100644 --- a/src/plugin/camel-case/camel-case-plugin.ts +++ b/src/plugin/camel-case/camel-case-plugin.ts @@ -51,7 +51,7 @@ export interface CamelCasePluginOptions { /** * A plugin that converts snake_case identifiers in the database into - * camelCase in the javascript side. + * camelCase in the JavaScript side. * * For example let's assume we have a table called `person_table` * with columns `first_name` and `last_name` in the database. When @@ -91,7 +91,7 @@ export interface CamelCasePluginOptions { * ``` * * As you can see from the example, __everything__ needs to be defined - * in camelCase in the typescript code: table names, columns, schemas, + * in camelCase in the TypeScript code: table names, columns, schemas, * __everything__. When using the `CamelCasePlugin` Kysely works as if * the database was defined in camelCase. * diff --git a/src/query-builder/delete-query-builder.ts b/src/query-builder/delete-query-builder.ts index 239a78991..42ddb350f 100644 --- a/src/query-builder/delete-query-builder.ts +++ b/src/query-builder/delete-query-builder.ts @@ -959,17 +959,17 @@ export class DeleteQueryBuilder /** * Asserts that query's output row type equals the given type `T`. * - * This method can be used to simplify excessively complex types to make typescript happy + * This method can be used to simplify excessively complex types to make TypeScript happy * and much faster. * * Kysely uses complex type magic to achieve its type safety. This complexity is sometimes too much - * for typescript and you get errors like this: + * for TypeScript and you get errors like this: * * ``` * error TS2589: Type instantiation is excessively deep and possibly infinite. * ``` * - * In these case you can often use this method to help typescript a little bit. When you use this + * In these case you can often use this method to help TypeScript a little bit. When you use this * method to assert the output type of a query, Kysely can drop the complex output type that * consists of multiple nested helper types and replace it with the simple asserted type. * diff --git a/src/query-builder/function-module.ts b/src/query-builder/function-module.ts index dda74d9f1..bb8748dd6 100644 --- a/src/query-builder/function-module.ts +++ b/src/query-builder/function-module.ts @@ -199,7 +199,7 @@ export interface FunctionModule { * If this function is used in a `select` statement, the type of the selected * expression will be `number | string` by default. This is because Kysely can't know the * type the db driver outputs. Sometimes the output can be larger than the largest - * javascript number and a string is returned instead. Most drivers allow you + * JavaScript number and a string is returned instead. Most drivers allow you * to configure the output type of large numbers and Kysely can't know if you've * done so. * @@ -371,7 +371,7 @@ export interface FunctionModule { * If this function is used in a `select` statement, the type of the selected * expression will be `number | string | bigint` by default. This is because * Kysely can't know the type the db driver outputs. Sometimes the output can - * be larger than the largest javascript number and a string is returned instead. + * be larger than the largest JavaScript number and a string is returned instead. * Most drivers allow you to configure the output type of large numbers and Kysely * can't know if you've done so. * @@ -429,7 +429,7 @@ export interface FunctionModule { * If this is used in a `select` statement, the type of the selected expression * will be `number | string | bigint` by default. This is because Kysely * can't know the type the db driver outputs. Sometimes the output can be larger - * than the largest javascript number and a string is returned instead. Most + * than the largest JavaScript number and a string is returned instead. Most * drivers allow you to configure the output type of large numbers and Kysely * can't know if you've done so. * @@ -630,7 +630,7 @@ export interface FunctionModule { * If this function is used in a `select` statement, the type of the selected * expression will be `number | string` by default. This is because Kysely can't know the * type the db driver outputs. Sometimes the output can be larger than the largest - * javascript number and a string is returned instead. Most drivers allow you + * JavaScript number and a string is returned instead. Most drivers allow you * to configure the output type of large numbers and Kysely can't know if you've * done so. * diff --git a/src/query-builder/insert-query-builder.ts b/src/query-builder/insert-query-builder.ts index e40905128..d1383d026 100644 --- a/src/query-builder/insert-query-builder.ts +++ b/src/query-builder/insert-query-builder.ts @@ -881,17 +881,17 @@ export class InsertQueryBuilder /** * Asserts that query's output row type equals the given type `T`. * - * This method can be used to simplify excessively complex types to make typescript happy + * This method can be used to simplify excessively complex types to make TypeScript happy * and much faster. * * Kysely uses complex type magic to achieve its type safety. This complexity is sometimes too much - * for typescript and you get errors like this: + * for TypeScript and you get errors like this: * * ``` * error TS2589: Type instantiation is excessively deep and possibly infinite. * ``` * - * In these case you can often use this method to help typescript a little bit. When you use this + * In these case you can often use this method to help TypeScript a little bit. When you use this * method to assert the output type of a query, Kysely can drop the complex output type that * consists of multiple nested helper types and replace it with the simple asserted type. * diff --git a/src/query-builder/select-query-builder.ts b/src/query-builder/select-query-builder.ts index 2369c3071..dd1312314 100644 --- a/src/query-builder/select-query-builder.ts +++ b/src/query-builder/select-query-builder.ts @@ -286,9 +286,9 @@ export interface SelectQueryBuilder * * * - * Sometimes you can be sure something's not null but Kysely isn't able to infer + * Sometimes you can be sure something's not null, but Kysely isn't able to infer * it. For example calling `where('last_name', 'is not', null)` doesn't make - * `last_name` not null in the result type but unless you have other where statements + * `last_name` not null in the result type, but unless you have other where statements * you can be sure it's never null. * * Kysely has a couple of helpers for dealing with these cases: `$notNull()` and `$narrowType`. @@ -1548,7 +1548,7 @@ export interface SelectQueryBuilder /** * Call `func(this)` if `condition` is true. * - * NOTE: This method has an impact on typescript performance and it should only be used + * NOTE: This method has an impact on TypeScript performance and it should only be used * when necessary. Remember that you can call most methods like `where` conditionally * like this: * @@ -1777,17 +1777,17 @@ export interface SelectQueryBuilder /** * Asserts that query's output row type equals the given type `T`. * - * This method can be used to simplify excessively complex types to make typescript happy + * This method can be used to simplify excessively complex types to make TypeScript happy * and much faster. * * Kysely uses complex type magic to achieve its type safety. This complexity is sometimes too much - * for typescript and you get errors like this: + * for TypeScript and you get errors like this: * * ``` * error TS2589: Type instantiation is excessively deep and possibly infinite. * ``` * - * In these case you can often use this method to help typescript a little bit. When you use this + * In these case you can often use this method to help TypeScript a little bit. When you use this * method to assert the output type of a query, Kysely can drop the complex output type that * consists of multiple nested helper types and replace it with the simple asserted type. * diff --git a/src/query-builder/update-query-builder.ts b/src/query-builder/update-query-builder.ts index 443c0b382..f8422bfba 100644 --- a/src/query-builder/update-query-builder.ts +++ b/src/query-builder/update-query-builder.ts @@ -908,17 +908,17 @@ export class UpdateQueryBuilder /** * Asserts that query's output row type equals the given type `T`. * - * This method can be used to simplify excessively complex types to make typescript happy + * This method can be used to simplify excessively complex types to make TypeScript happy * and much faster. * * Kysely uses complex type magic to achieve its type safety. This complexity is sometimes too much - * for typescript and you get errors like this: + * for TypeScript and you get errors like this: * * ``` * error TS2589: Type instantiation is excessively deep and possibly infinite. * ``` * - * In these case you can often use this method to help typescript a little bit. When you use this + * In these case you can often use this method to help TypeScript a little bit. When you use this * method to assert the output type of a query, Kysely can drop the complex output type that * consists of multiple nested helper types and replace it with the simple asserted type. * diff --git a/test/node/src/with.test.ts b/test/node/src/with.test.ts index d51520814..a45c5c64d 100644 --- a/test/node/src/with.test.ts +++ b/test/node/src/with.test.ts @@ -152,7 +152,7 @@ for (const dialect of DIALECTS) { ]) .execute() - // Fetch a node and all it's ancestors using a single recursive CTE. + // Fetch a node and all its ancestors using a single recursive CTE. const query = nodeTrx .withRecursive('ancestors(name, parent)', (db) => db