missing columns in typings?

second time ive had this issue now in a different project than the last, no answer on my last post
No description
No description
9 Replies
max
maxOP4mo ago
better first screenshot
No description
Angelelz
Angelelz4mo ago
Any columns with defaults or nullable, is not required during insert, because they have default they can be left blank
max
maxOP4mo ago
Problem is that it gives a typescript error when I try to insert with them But runtime it’s fine
Angelelz
Angelelz4mo ago
Can I see your tsconfig?
max
maxOP4mo ago
GitHub
files/tsconfig.json at main · mxz7/files
Contribute to mxz7/files development by creating an account on GitHub.
Angelelz
Angelelz4mo ago
Now that I think about it, even columns with defaults should show as optional What about ./.svelte-kit/tsconfig.json ?
max
maxOP4mo ago
{
"compilerOptions": {
"paths": {
"$lib": [
"../src/lib"
],
"$lib/*": [
"../src/lib/*"
]
},
"rootDirs": [
"..",
"./types"
],
"verbatimModuleSyntax": true,
"isolatedModules": true,
"lib": [
"esnext",
"DOM",
"DOM.Iterable"
],
"moduleResolution": "bundler",
"module": "esnext",
"noEmit": true,
"target": "esnext"
},
"include": [
"ambient.d.ts",
"non-ambient.d.ts",
"./types/**/$types.d.ts",
"../vite.config.js",
"../vite.config.ts",
"../src/**/*.js",
"../src/**/*.ts",
"../src/**/*.svelte",
"../tests/**/*.js",
"../tests/**/*.ts",
"../tests/**/*.svelte"
],
"exclude": [
"../node_modules/**",
"../src/service-worker.js",
"../src/service-worker.ts",
"../src/service-worker.d.ts"
]
}
{
"compilerOptions": {
"paths": {
"$lib": [
"../src/lib"
],
"$lib/*": [
"../src/lib/*"
]
},
"rootDirs": [
"..",
"./types"
],
"verbatimModuleSyntax": true,
"isolatedModules": true,
"lib": [
"esnext",
"DOM",
"DOM.Iterable"
],
"moduleResolution": "bundler",
"module": "esnext",
"noEmit": true,
"target": "esnext"
},
"include": [
"ambient.d.ts",
"non-ambient.d.ts",
"./types/**/$types.d.ts",
"../vite.config.js",
"../vite.config.ts",
"../src/**/*.js",
"../src/**/*.ts",
"../src/**/*.svelte",
"../tests/**/*.js",
"../tests/**/*.ts",
"../tests/**/*.svelte"
],
"exclude": [
"../node_modules/**",
"../src/service-worker.js",
"../src/service-worker.ts",
"../src/service-worker.d.ts"
]
}
apologies for late reply
Angelelz
Angelelz4mo ago
There are seeral things in your tsconfig that catch my attention. "strict": false, and strictNullChecks not present. Can yo try first setting strict to true and then strictNullChecks? I don't think strictNullChecks is the reason, but strict might be
max
maxOP4mo ago
oh shit yeah strict works thank you very much
Want results from more Discord servers?
Add your server