Skip to content

Commit c8e790a

Browse files
authored
Add explicit TypeInfo types for examples with getContext (#9016)
1 parent 4febf95 commit c8e790a

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

examples/custom-id/keystone.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { config } from '@keystone-6/core'
22
import { fixPrismaPath } from '../example-utils'
33
import { lists } from './schema'
4+
import type { TypeInfo } from '.keystone/types'
45

5-
export default config({
6+
export default config<TypeInfo>({
67
db: {
78
provider: 'sqlite',
89
url: process.env.DATABASE_URL || 'file:./keystone-example.db',

examples/limits/keystone.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { config } from '@keystone-6/core'
22
import { fixPrismaPath } from '../example-utils'
33
import { lists } from './schema'
4+
import type { TypeInfo } from '.keystone/types'
45

5-
export default config({
6+
export default config<TypeInfo>({
67
db: {
78
provider: 'sqlite',
89
url: process.env.DATABASE_URL || 'file:./keystone-example.db',

examples/singleton/keystone.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { config } from '@keystone-6/core'
22
import { fixPrismaPath } from '../example-utils'
33
import { lists } from './schema'
4+
import type { TypeInfo } from '.keystone/types'
45

5-
export default config({
6+
export default config<TypeInfo>({
67
db: {
78
provider: 'sqlite',
89
url: process.env.DATABASE_URL || 'file:./keystone-example.db',

examples/usecase-blog/keystone.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { config } from '@keystone-6/core'
22
import { fixPrismaPath } from '../example-utils'
33
import { lists } from './schema'
4-
import { type TypeInfo } from '.keystone/types'
4+
import type { TypeInfo } from '.keystone/types'
55

66
export default config<TypeInfo>({
77
db: {

examples/usecase-todo/keystone.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { config } from '@keystone-6/core'
22
import { fixPrismaPath } from '../example-utils'
33
import { lists } from './schema'
4+
import type { TypeInfo } from '.keystone/types'
45

5-
export default config({
6+
export default config<TypeInfo>({
67
db: {
78
provider: 'sqlite',
89
url: process.env.DATABASE_URL || 'file:./keystone-example.db',

0 commit comments

Comments
 (0)