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
maxOP3mo ago
better first screenshot
No description
Angelelz
Angelelz3mo ago
Any columns with defaults or nullable, is not required during insert, because they have default they can be left blank
max
maxOP3mo ago
Problem is that it gives a typescript error when I try to insert with them But runtime it’s fine
Angelelz
Angelelz3mo ago
Can I see your tsconfig?
max
maxOP3mo ago
GitHub
files/tsconfig.json at main · mxz7/files
Contribute to mxz7/files development by creating an account on GitHub.
Angelelz
Angelelz3mo ago
Now that I think about it, even columns with defaults should show as optional What about ./.svelte-kit/tsconfig.json ?
max
maxOP3mo 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
Angelelz3mo 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
maxOP3mo ago
oh shit yeah strict works thank you very much
Want results from more Discord servers?
Add your server