I just want to do `const config: SuperTokensConfig = { appInfo: ..., ...}` and have typescript enfor...
j
I just want to do
const config: SuperTokensConfig = { appInfo: ..., ...}
and have typescript enforce type correctness of the config
r
hey @jin49
the types are not exposed by the frontend SDK unfortunately. That beignn said, you can add your config directly in supertokens.init(config) And then if the implicit type of
config
is wrong, TS will complain
p
it's a bit hacky, but you could do something like:
Copy code
ts
const config: Parameters<typeof SuperTokens.init>[0] = {.... };
(depending on the TS version)
j
fancy, I didn't know TS supported reflection like that
thanks for the pointers and affirming that I'm not missing something simple!
p
happy to help 🙂 TS can do pretty powerful stuff (to the point where it gets really hard understand :D)