Magus
Magus
Explore posts from servers
TTyphonJS
Created by TyphonJS (Michael) on 10/22/2023 in #typhonjs-runtime
Reactivty and prepareDerivedData
You could create event listeners on the prepareDerivedData, the components could pick up the signals when prepareDerivedData is called and update their local values
26 replies
TTyphonJS
Created by Magus on 10/15/2023 in #typhonjs-runtime
Issues Configuring TyphonJS in TS
Just in case someone's happens to read this: for typescript to properly function in svelte you need a svelte.config.js with a preprocessor, otherwise svelte thinks its commonjs and weird bugs happen if you set moduleResolution to NodeNext
11 replies
TTyphonJS
Created by Magus on 10/15/2023 in #typhonjs-runtime
Issues Configuring TyphonJS in TS
Broken global.d.ts when "module" is set to node16 and moduleResolution is set to nodenext
Solution: "typeRoots" and "types" are not enough, need to include the global.d.ts in "include" as well
11 replies
TTyphonJS
Created by Magus on 10/15/2023 in #typhonjs-runtime
Issues Configuring TyphonJS in TS
Im going to post if I find it, just in case someone else might have the problem
11 replies
TTyphonJS
Created by Magus on 10/15/2023 in #typhonjs-runtime
Issues Configuring TyphonJS in TS
It broke my Foundry Global Types, but im looking for the solution
11 replies
TTyphonJS
Created by Magus on 10/15/2023 in #typhonjs-runtime
Issues Configuring TyphonJS in TS
For TS though you need to set module and moduleResolution to "node16" or "nodenext" and include the imports field in your package.json. It should look like this:
Yes this solved most of my issues, ty
11 replies
TTyphonJS
Created by Magus on 10/15/2023 in #typhonjs-runtime
Issues Configuring TyphonJS in TS
{
"compilerOptions": {
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "Node",

"baseUrl": "./",
"declaration": true,
"declarationDir": "lib",

"strict": true,

"skipLibCheck": true,
"isolatedModules": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"jsx": "preserve",

"allowJs": true,
"checkJs": true,

"noImplicitOverride": true,

"paths": {
"@/*": ["src/*"],
"#runtime/*": ["node_modules/@typhonjs-fvtt/runtime/*"],
"#standard/*": ["node_modules/@typhonjs-fvtt/svelte-standard/*"]
},
"lib": ["ES2022", "DOM"],
"typeRoots": ["node_modules", "types"],
"types": ["dice-so-nice", "foundry", "handlebars", "@types/jquery", "socket.io", "svelte"]
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.svelte"],
"exclude": ["node_modules"],
"references": [{ "path": "./tsconfig.node.json" }]
}
{
"compilerOptions": {
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "Node",

"baseUrl": "./",
"declaration": true,
"declarationDir": "lib",

"strict": true,

"skipLibCheck": true,
"isolatedModules": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"jsx": "preserve",

"allowJs": true,
"checkJs": true,

"noImplicitOverride": true,

"paths": {
"@/*": ["src/*"],
"#runtime/*": ["node_modules/@typhonjs-fvtt/runtime/*"],
"#standard/*": ["node_modules/@typhonjs-fvtt/svelte-standard/*"]
},
"lib": ["ES2022", "DOM"],
"typeRoots": ["node_modules", "types"],
"types": ["dice-so-nice", "foundry", "handlebars", "@types/jquery", "socket.io", "svelte"]
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.svelte"],
"exclude": ["node_modules"],
"references": [{ "path": "./tsconfig.node.json" }]
}
11 replies