mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-11-23 01:54:37 +03:00
Enable a subset of strict: true
when building SDK (#2054)
This commit is contained in:
parent
82d0da92f3
commit
7313fe6e53
@ -9,6 +9,15 @@
|
||||
|
||||
### ⚠️ Breaking Changes & Migration Guide
|
||||
|
||||
#### Strict options when building the `wasp` package
|
||||
|
||||
The `wasp` package is now built with `strictBindCallApply`, `alwaysStrict`, `noImplicitThis`, and `strictFunctionTypes`.
|
||||
This is a breaking change only if you have manually set your `tsconfig.json`'s `strict` field to `false` and are relying on it being more permissive.
|
||||
To fix the errors, enable the options listed above and make sure your code type checks.
|
||||
|
||||
This quirk is only temporary. You'll soon be able to use any `tsconfig.json` options you want.
|
||||
Track this issue for progress: https://github.com/wasp-lang/wasp/issues/1827
|
||||
|
||||
#### Directly calling Queries on the client
|
||||
|
||||
You can now call Queries directly from the client without dealing with
|
||||
|
@ -32,7 +32,7 @@ type RoutesDefinition = {
|
||||
}
|
||||
}
|
||||
|
||||
type BuildFn = (params: unknown) => string
|
||||
type BuildFn = (params: never) => string
|
||||
|
||||
type ParamsFromBuildFn<BF extends BuildFn> = Parameters<BF>[0] extends {
|
||||
params: infer Params
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ReactElement } from 'react'
|
||||
import { ReactElement, ReactNode } from 'react'
|
||||
import { serialize as superjsonSerialize } from 'superjson'
|
||||
import { rest, type ResponseResolver, type RestContext } from 'msw'
|
||||
import { setupServer, type SetupServer } from 'msw/node'
|
||||
@ -31,7 +31,7 @@ export function renderInContext(ui: ReactElement): RenderResult {
|
||||
)
|
||||
return {
|
||||
...result,
|
||||
rerender: (rerenderUi: ReactElement) =>
|
||||
rerender: (rerenderUi: ReactNode) =>
|
||||
rerender(
|
||||
<QueryClientProvider client={client}>
|
||||
<Router>{rerenderUi}</Router>
|
||||
|
@ -36,7 +36,7 @@ apiEventsEmitter.on('sessionId.set', refreshAuthToken)
|
||||
apiEventsEmitter.on('sessionId.clear', refreshAuthToken)
|
||||
|
||||
// PRIVATE API
|
||||
export const WebSocketContext: Context<WebSocketContextValue> = createContext({
|
||||
export const WebSocketContext: Context<WebSocketContextValue> = createContext<WebSocketContextValue>({
|
||||
socket,
|
||||
isConnected: false,
|
||||
});
|
||||
|
@ -10,6 +10,16 @@
|
||||
],
|
||||
"declaration": true,
|
||||
"strict": false,
|
||||
"strictBindCallApply": true,
|
||||
"alwaysStrict": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
// See https://github.com/wasp-lang/wasp/issues/2056 before activating this:
|
||||
// "useUnknownInCatchVariables": true,
|
||||
// The following 3 stict options will require more work:
|
||||
// "noImplicitAny": true,
|
||||
// "strictNullChecks": true,
|
||||
// "strictPropertyInitialization": true,
|
||||
// Overriding this because we want to use top-level await
|
||||
"module": "esnext",
|
||||
"target": "es2017",
|
||||
|
@ -130,7 +130,7 @@
|
||||
"file",
|
||||
"../out/sdk/wasp/client/router/types.ts"
|
||||
],
|
||||
"d6feb23110d8cae5c94badd5cdec320207e1a5406cb827eb684aa4cffc3d7050"
|
||||
"9bfaabe92126b641e6b939c26bac121dbbe1bb495392a5d40474ef4981432b5f"
|
||||
],
|
||||
[
|
||||
[
|
||||
@ -144,7 +144,7 @@
|
||||
"file",
|
||||
"../out/sdk/wasp/client/test/vitest/helpers.tsx"
|
||||
],
|
||||
"b44ff591a2eebfff4de9fa9e9e1b89f1f22f523f03ab0febc19ff3999721b39a"
|
||||
"184454828b021bbc8f9927533cea271614ac9661598c7f458909980ad4b68d80"
|
||||
],
|
||||
[
|
||||
[
|
||||
@ -319,7 +319,7 @@
|
||||
"file",
|
||||
"../out/sdk/wasp/tsconfig.json"
|
||||
],
|
||||
"d96d435d03a397474a3edf3f1c0bbc58edd9860d9575bb59ba51e7d764339544"
|
||||
"4323884e7e8c52683788995be58e8f583c00fc611845fdbd481157d0118dccd2"
|
||||
],
|
||||
[
|
||||
[
|
||||
|
@ -32,7 +32,7 @@ type RoutesDefinition = {
|
||||
}
|
||||
}
|
||||
|
||||
type BuildFn = (params: unknown) => string
|
||||
type BuildFn = (params: never) => string
|
||||
|
||||
type ParamsFromBuildFn<BF extends BuildFn> = Parameters<BF>[0] extends {
|
||||
params: infer Params
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ReactElement } from 'react'
|
||||
import { ReactElement, ReactNode } from 'react'
|
||||
import { serialize as superjsonSerialize } from 'superjson'
|
||||
import { rest, type ResponseResolver, type RestContext } from 'msw'
|
||||
import { setupServer, type SetupServer } from 'msw/node'
|
||||
@ -31,7 +31,7 @@ export function renderInContext(ui: ReactElement): RenderResult {
|
||||
)
|
||||
return {
|
||||
...result,
|
||||
rerender: (rerenderUi: ReactElement) =>
|
||||
rerender: (rerenderUi: ReactNode) =>
|
||||
rerender(
|
||||
<QueryClientProvider client={client}>
|
||||
<Router>{rerenderUi}</Router>
|
||||
|
@ -19,7 +19,7 @@ type RoutesDefinition = {
|
||||
build: BuildFn;
|
||||
};
|
||||
};
|
||||
type BuildFn = (params: unknown) => string;
|
||||
type BuildFn = (params: never) => string;
|
||||
type ParamsFromBuildFn<BF extends BuildFn> = Parameters<BF>[0] extends {
|
||||
params: infer Params;
|
||||
} ? {
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"helpers.jsx","sourceRoot":"","sources":["../../../../client/test/vitest/helpers.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAC3D,OAAO,EAAE,IAAI,EAA2C,MAAM,KAAK,CAAA;AACnE,OAAO,EAAE,WAAW,EAAoB,MAAM,UAAU,CAAA;AACxD,OAAO,EAAE,aAAa,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAgB,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACtE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AACxE,OAAO,EAAE,SAAS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AM,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;QACtD,MAAM,IAAI,KAAK,CACb,yCACE,KAAK,CAAC,MACR,mCAAmC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAC3E,CAAA;IACH,CAAC;IAED,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,IAAI,EAAE,CAAA;IAE3C,MAAM,QAAQ,GAAyD;QACrE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,eAAe,CAAC;QAChD,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,eAAe,CAAC;QAClD,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,eAAe,CAAC;QAChD,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,eAAe,CAAC;KACvD,CAAA;IAED,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAA;AACpC,CAAC"}
|
@ -9,6 +9,16 @@
|
||||
],
|
||||
"declaration": true,
|
||||
"strict": false,
|
||||
"strictBindCallApply": true,
|
||||
"alwaysStrict": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
// See https://github.com/wasp-lang/wasp/issues/2056 before activating this:
|
||||
// "useUnknownInCatchVariables": true,
|
||||
// The following 3 stict options will require more work:
|
||||
// "noImplicitAny": true,
|
||||
// "strictNullChecks": true,
|
||||
// "strictPropertyInitialization": true,
|
||||
// Overriding this because we want to use top-level await
|
||||
"module": "esnext",
|
||||
"target": "es2017",
|
||||
|
@ -32,7 +32,7 @@ type RoutesDefinition = {
|
||||
}
|
||||
}
|
||||
|
||||
type BuildFn = (params: unknown) => string
|
||||
type BuildFn = (params: never) => string
|
||||
|
||||
type ParamsFromBuildFn<BF extends BuildFn> = Parameters<BF>[0] extends {
|
||||
params: infer Params
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ReactElement } from 'react'
|
||||
import { ReactElement, ReactNode } from 'react'
|
||||
import { serialize as superjsonSerialize } from 'superjson'
|
||||
import { rest, type ResponseResolver, type RestContext } from 'msw'
|
||||
import { setupServer, type SetupServer } from 'msw/node'
|
||||
@ -31,7 +31,7 @@ export function renderInContext(ui: ReactElement): RenderResult {
|
||||
)
|
||||
return {
|
||||
...result,
|
||||
rerender: (rerenderUi: ReactElement) =>
|
||||
rerender: (rerenderUi: ReactNode) =>
|
||||
rerender(
|
||||
<QueryClientProvider client={client}>
|
||||
<Router>{rerenderUi}</Router>
|
||||
|
@ -19,7 +19,7 @@ type RoutesDefinition = {
|
||||
build: BuildFn;
|
||||
};
|
||||
};
|
||||
type BuildFn = (params: unknown) => string;
|
||||
type BuildFn = (params: never) => string;
|
||||
type ParamsFromBuildFn<BF extends BuildFn> = Parameters<BF>[0] extends {
|
||||
params: infer Params;
|
||||
} ? {
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"helpers.jsx","sourceRoot":"","sources":["../../../../client/test/vitest/helpers.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAC3D,OAAO,EAAE,IAAI,EAA2C,MAAM,KAAK,CAAA;AACnE,OAAO,EAAE,WAAW,EAAoB,MAAM,UAAU,CAAA;AACxD,OAAO,EAAE,aAAa,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAgB,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACtE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AACxE,OAAO,EAAE,SAAS,EAAE,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C,UAAU,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;QACtD,MAAM,IAAI,KAAK,CACb,yCACE,KAAK,CAAC,MACR,mCAAmC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAC3E,CAAA;IACH,CAAC;IAED,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,IAAI,EAAE,CAAA;IAE3C,MAAM,QAAQ,GAAyD;QACrE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,eAAe,CAAC;QAChD,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,eAAe,CAAC;QAClD,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,eAAe,CAAC;QAChD,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,eAAe,CAAC;KACvD,CAAA;IAED,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAA;AACpC,CAAC"}
|
@ -9,6 +9,16 @@
|
||||
],
|
||||
"declaration": true,
|
||||
"strict": false,
|
||||
"strictBindCallApply": true,
|
||||
"alwaysStrict": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
// See https://github.com/wasp-lang/wasp/issues/2056 before activating this:
|
||||
// "useUnknownInCatchVariables": true,
|
||||
// The following 3 stict options will require more work:
|
||||
// "noImplicitAny": true,
|
||||
// "strictNullChecks": true,
|
||||
// "strictPropertyInitialization": true,
|
||||
// Overriding this because we want to use top-level await
|
||||
"module": "esnext",
|
||||
"target": "es2017",
|
||||
|
@ -130,7 +130,7 @@
|
||||
"file",
|
||||
"../out/sdk/wasp/client/router/types.ts"
|
||||
],
|
||||
"d6feb23110d8cae5c94badd5cdec320207e1a5406cb827eb684aa4cffc3d7050"
|
||||
"9bfaabe92126b641e6b939c26bac121dbbe1bb495392a5d40474ef4981432b5f"
|
||||
],
|
||||
[
|
||||
[
|
||||
@ -144,7 +144,7 @@
|
||||
"file",
|
||||
"../out/sdk/wasp/client/test/vitest/helpers.tsx"
|
||||
],
|
||||
"b44ff591a2eebfff4de9fa9e9e1b89f1f22f523f03ab0febc19ff3999721b39a"
|
||||
"184454828b021bbc8f9927533cea271614ac9661598c7f458909980ad4b68d80"
|
||||
],
|
||||
[
|
||||
[
|
||||
@ -319,7 +319,7 @@
|
||||
"file",
|
||||
"../out/sdk/wasp/tsconfig.json"
|
||||
],
|
||||
"d96d435d03a397474a3edf3f1c0bbc58edd9860d9575bb59ba51e7d764339544"
|
||||
"4323884e7e8c52683788995be58e8f583c00fc611845fdbd481157d0118dccd2"
|
||||
],
|
||||
[
|
||||
[
|
||||
|
@ -32,7 +32,7 @@ type RoutesDefinition = {
|
||||
}
|
||||
}
|
||||
|
||||
type BuildFn = (params: unknown) => string
|
||||
type BuildFn = (params: never) => string
|
||||
|
||||
type ParamsFromBuildFn<BF extends BuildFn> = Parameters<BF>[0] extends {
|
||||
params: infer Params
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ReactElement } from 'react'
|
||||
import { ReactElement, ReactNode } from 'react'
|
||||
import { serialize as superjsonSerialize } from 'superjson'
|
||||
import { rest, type ResponseResolver, type RestContext } from 'msw'
|
||||
import { setupServer, type SetupServer } from 'msw/node'
|
||||
@ -31,7 +31,7 @@ export function renderInContext(ui: ReactElement): RenderResult {
|
||||
)
|
||||
return {
|
||||
...result,
|
||||
rerender: (rerenderUi: ReactElement) =>
|
||||
rerender: (rerenderUi: ReactNode) =>
|
||||
rerender(
|
||||
<QueryClientProvider client={client}>
|
||||
<Router>{rerenderUi}</Router>
|
||||
|
@ -19,7 +19,7 @@ type RoutesDefinition = {
|
||||
build: BuildFn;
|
||||
};
|
||||
};
|
||||
type BuildFn = (params: unknown) => string;
|
||||
type BuildFn = (params: never) => string;
|
||||
type ParamsFromBuildFn<BF extends BuildFn> = Parameters<BF>[0] extends {
|
||||
params: infer Params;
|
||||
} ? {
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"helpers.jsx","sourceRoot":"","sources":["../../../../client/test/vitest/helpers.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAC3D,OAAO,EAAE,IAAI,EAA2C,MAAM,KAAK,CAAA;AACnE,OAAO,EAAE,WAAW,EAAoB,MAAM,UAAU,CAAA;AACxD,OAAO,EAAE,aAAa,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAgB,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACtE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AACxE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAEvD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,UAAU,EAAS,MAAM,aAAa,CAAA;AAW/C,aAAa;AACb,+CAA+C;AAC/C,sIAAsI;AACtI,MAAM,UAAU,eAAe,CAAC,EAAgB;IAC9C,MAAM,MAAM,GAAG,IAAI,WAAW,EAAE,CAAA;IAChC,MAAM,KAA0B,MAAM,CACpC,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAClC;MAAA,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CACtB;IAAA,EAAE,mBAAmB,CAAC,CACvB,EAJK,EAAE,QAAQ,OAIf,EAJoB,MAAM,cAArB,YAAuB,CAI5B,CAAA;IACD,uCACK,MAAM,KACT,QAAQ,EAAE,CAAC,UAAwB,EAAE,EAAE,CAC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AAC,GAAG,EAAE,eAAe,CAAC;QAChD,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,eAAe,CAAC;KACvD,CAAA;IAED,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAA;AACpC,CAAC"}
|
@ -9,6 +9,16 @@
|
||||
],
|
||||
"declaration": true,
|
||||
"strict": false,
|
||||
"strictBindCallApply": true,
|
||||
"alwaysStrict": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
// See https://github.com/wasp-lang/wasp/issues/2056 before activating this:
|
||||
// "useUnknownInCatchVariables": true,
|
||||
// The following 3 stict options will require more work:
|
||||
// "noImplicitAny": true,
|
||||
// "strictNullChecks": true,
|
||||
// "strictPropertyInitialization": true,
|
||||
// Overriding this because we want to use top-level await
|
||||
"module": "esnext",
|
||||
"target": "es2017",
|
||||
|
@ -326,7 +326,7 @@
|
||||
"file",
|
||||
"../out/sdk/wasp/client/router/types.ts"
|
||||
],
|
||||
"d6feb23110d8cae5c94badd5cdec320207e1a5406cb827eb684aa4cffc3d7050"
|
||||
"9bfaabe92126b641e6b939c26bac121dbbe1bb495392a5d40474ef4981432b5f"
|
||||
],
|
||||
[
|
||||
[
|
||||
@ -340,7 +340,7 @@
|
||||
"file",
|
||||
"../out/sdk/wasp/client/test/vitest/helpers.tsx"
|
||||
],
|
||||
"b44ff591a2eebfff4de9fa9e9e1b89f1f22f523f03ab0febc19ff3999721b39a"
|
||||
"184454828b021bbc8f9927533cea271614ac9661598c7f458909980ad4b68d80"
|
||||
],
|
||||
[
|
||||
[
|
||||
@ -718,7 +718,7 @@
|
||||
"file",
|
||||
"../out/sdk/wasp/tsconfig.json"
|
||||
],
|
||||
"d96d435d03a397474a3edf3f1c0bbc58edd9860d9575bb59ba51e7d764339544"
|
||||
"4323884e7e8c52683788995be58e8f583c00fc611845fdbd481157d0118dccd2"
|
||||
],
|
||||
[
|
||||
[
|
||||
|
@ -32,7 +32,7 @@ type RoutesDefinition = {
|
||||
}
|
||||
}
|
||||
|
||||
type BuildFn = (params: unknown) => string
|
||||
type BuildFn = (params: never) => string
|
||||
|
||||
type ParamsFromBuildFn<BF extends BuildFn> = Parameters<BF>[0] extends {
|
||||
params: infer Params
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ReactElement } from 'react'
|
||||
import { ReactElement, ReactNode } from 'react'
|
||||
import { serialize as superjsonSerialize } from 'superjson'
|
||||
import { rest, type ResponseResolver, type RestContext } from 'msw'
|
||||
import { setupServer, type SetupServer } from 'msw/node'
|
||||
@ -31,7 +31,7 @@ export function renderInContext(ui: ReactElement): RenderResult {
|
||||
)
|
||||
return {
|
||||
...result,
|
||||
rerender: (rerenderUi: ReactElement) =>
|
||||
rerender: (rerenderUi: ReactNode) =>
|
||||
rerender(
|
||||
<QueryClientProvider client={client}>
|
||||
<Router>{rerenderUi}</Router>
|
||||
|
@ -19,7 +19,7 @@ type RoutesDefinition = {
|
||||
build: BuildFn;
|
||||
};
|
||||
};
|
||||
type BuildFn = (params: unknown) => string;
|
||||
type BuildFn = (params: never) => string;
|
||||
type ParamsFromBuildFn<BF extends BuildFn> = Parameters<BF>[0] extends {
|
||||
params: infer Params;
|
||||
} ? {
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"helpers.jsx","sourceRoot":"","sources":["../../../../client/test/vitest/helpers.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAC3D,OAAO,EAAE,IAAI,EAA2C,MAAM,KAAK,CAAA;AACnE,OAAO,EAAE,WAAW,EAAoB,MAAM,UAAU,CAAA;AACxD,OAAO,EAAE,aAAa,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAgB,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACtE,OAAO,EAAE,WA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B,MAAmB,EACnB,KAAY,EACZ,eAAwD;IAExD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;QACtD,MAAM,IAAI,KAAK,CACb,yCACE,KAAK,CAAC,MACR,mCAAmC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAC3E,CAAA;IACH,CAAC;IAED,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,IAAI,EAAE,CAAA;IAE3C,MAAM,QAAQ,GAAyD;QACrE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,eAAe,CAAC;QAChD,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,eAAe,CAAC;QAClD,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,eAAe,CAAC;QAChD,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,eAAe,CAAC;KACvD,CAAA;IAED,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAA;AACpC,CAAC"}
|
@ -9,6 +9,16 @@
|
||||
],
|
||||
"declaration": true,
|
||||
"strict": false,
|
||||
"strictBindCallApply": true,
|
||||
"alwaysStrict": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
// See https://github.com/wasp-lang/wasp/issues/2056 before activating this:
|
||||
// "useUnknownInCatchVariables": true,
|
||||
// The following 3 stict options will require more work:
|
||||
// "noImplicitAny": true,
|
||||
// "strictNullChecks": true,
|
||||
// "strictPropertyInitialization": true,
|
||||
// Overriding this because we want to use top-level await
|
||||
"module": "esnext",
|
||||
"target": "es2017",
|
||||
|
@ -130,7 +130,7 @@
|
||||
"file",
|
||||
"../out/sdk/wasp/client/router/types.ts"
|
||||
],
|
||||
"d6feb23110d8cae5c94badd5cdec320207e1a5406cb827eb684aa4cffc3d7050"
|
||||
"9bfaabe92126b641e6b939c26bac121dbbe1bb495392a5d40474ef4981432b5f"
|
||||
],
|
||||
[
|
||||
[
|
||||
@ -144,7 +144,7 @@
|
||||
"file",
|
||||
"../out/sdk/wasp/client/test/vitest/helpers.tsx"
|
||||
],
|
||||
"b44ff591a2eebfff4de9fa9e9e1b89f1f22f523f03ab0febc19ff3999721b39a"
|
||||
"184454828b021bbc8f9927533cea271614ac9661598c7f458909980ad4b68d80"
|
||||
],
|
||||
[
|
||||
[
|
||||
@ -375,7 +375,7 @@
|
||||
"file",
|
||||
"../out/sdk/wasp/tsconfig.json"
|
||||
],
|
||||
"d96d435d03a397474a3edf3f1c0bbc58edd9860d9575bb59ba51e7d764339544"
|
||||
"4323884e7e8c52683788995be58e8f583c00fc611845fdbd481157d0118dccd2"
|
||||
],
|
||||
[
|
||||
[
|
||||
|
@ -32,7 +32,7 @@ type RoutesDefinition = {
|
||||
}
|
||||
}
|
||||
|
||||
type BuildFn = (params: unknown) => string
|
||||
type BuildFn = (params: never) => string
|
||||
|
||||
type ParamsFromBuildFn<BF extends BuildFn> = Parameters<BF>[0] extends {
|
||||
params: infer Params
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ReactElement } from 'react'
|
||||
import { ReactElement, ReactNode } from 'react'
|
||||
import { serialize as superjsonSerialize } from 'superjson'
|
||||
import { rest, type ResponseResolver, type RestContext } from 'msw'
|
||||
import { setupServer, type SetupServer } from 'msw/node'
|
||||
@ -31,7 +31,7 @@ export function renderInContext(ui: ReactElement): RenderResult {
|
||||
)
|
||||
return {
|
||||
...result,
|
||||
rerender: (rerenderUi: ReactElement) =>
|
||||
rerender: (rerenderUi: ReactNode) =>
|
||||
rerender(
|
||||
<QueryClientProvider client={client}>
|
||||
<Router>{rerenderUi}</Router>
|
||||
|
@ -19,7 +19,7 @@ type RoutesDefinition = {
|
||||
build: BuildFn;
|
||||
};
|
||||
};
|
||||
type BuildFn = (params: unknown) => string;
|
||||
type BuildFn = (params: never) => string;
|
||||
type ParamsFromBuildFn<BF extends BuildFn> = Parameters<BF>[0] extends {
|
||||
params: infer Params;
|
||||
} ? {
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"helpers.jsx","sourceRoot":"","sources":["../../../../client/test/vitest/helpers.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAC3D,OAAO,EAAE,IAAI,EAA2C,MAAM,KAAK,CAAA;AACnE,OAAO,EAAE,WAAW,EAAoB,MAAM,UAAU,CAAA;AACxD,OAAO,EAAE,aAAa,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAgB,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACtE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AACxE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAEvD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,UAAU,EAAS,MAAM,aAAa,CAAA;AAW/C,aAAa;AACb,+CAA+C;AAC/C,sIAAsI;AACtI,MAAM,UAAU,eAAe,CAAC,EAAgB;IAC9C,MAAM,MAAM,GAAG,IAAI,WAAW,EAAE,CAAA;IAChC,MAAM,KAA0B,MAAM,CACpC,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAClC;MAAA,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CACtB;IAAA,EAAE,mBAAmB,CAAC,CACvB,EAJK,EAAE,QAAQ,OAIf,EAJoB,MAAM,cAArB,YAAuB,C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,eAAe,CAAC;QAClD,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,eAAe,CAAC;QAChD,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,eAAe,CAAC;KACvD,CAAA;IAED,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAA;AACpC,CAAC"}
|
@ -9,6 +9,16 @@
|
||||
],
|
||||
"declaration": true,
|
||||
"strict": false,
|
||||
"strictBindCallApply": true,
|
||||
"alwaysStrict": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
// See https://github.com/wasp-lang/wasp/issues/2056 before activating this:
|
||||
// "useUnknownInCatchVariables": true,
|
||||
// The following 3 stict options will require more work:
|
||||
// "noImplicitAny": true,
|
||||
// "strictNullChecks": true,
|
||||
// "strictPropertyInitialization": true,
|
||||
// Overriding this because we want to use top-level await
|
||||
"module": "esnext",
|
||||
"target": "es2017",
|
||||
|
@ -130,7 +130,7 @@
|
||||
"file",
|
||||
"../out/sdk/wasp/client/router/types.ts"
|
||||
],
|
||||
"d6feb23110d8cae5c94badd5cdec320207e1a5406cb827eb684aa4cffc3d7050"
|
||||
"9bfaabe92126b641e6b939c26bac121dbbe1bb495392a5d40474ef4981432b5f"
|
||||
],
|
||||
[
|
||||
[
|
||||
@ -144,7 +144,7 @@
|
||||
"file",
|
||||
"../out/sdk/wasp/client/test/vitest/helpers.tsx"
|
||||
],
|
||||
"b44ff591a2eebfff4de9fa9e9e1b89f1f22f523f03ab0febc19ff3999721b39a"
|
||||
"184454828b021bbc8f9927533cea271614ac9661598c7f458909980ad4b68d80"
|
||||
],
|
||||
[
|
||||
[
|
||||
@ -319,7 +319,7 @@
|
||||
"file",
|
||||
"../out/sdk/wasp/tsconfig.json"
|
||||
],
|
||||
"d96d435d03a397474a3edf3f1c0bbc58edd9860d9575bb59ba51e7d764339544"
|
||||
"4323884e7e8c52683788995be58e8f583c00fc611845fdbd481157d0118dccd2"
|
||||
],
|
||||
[
|
||||
[
|
||||
|
@ -32,7 +32,7 @@ type RoutesDefinition = {
|
||||
}
|
||||
}
|
||||
|
||||
type BuildFn = (params: unknown) => string
|
||||
type BuildFn = (params: never) => string
|
||||
|
||||
type ParamsFromBuildFn<BF extends BuildFn> = Parameters<BF>[0] extends {
|
||||
params: infer Params
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ReactElement } from 'react'
|
||||
import { ReactElement, ReactNode } from 'react'
|
||||
import { serialize as superjsonSerialize } from 'superjson'
|
||||
import { rest, type ResponseResolver, type RestContext } from 'msw'
|
||||
import { setupServer, type SetupServer } from 'msw/node'
|
||||
@ -31,7 +31,7 @@ export function renderInContext(ui: ReactElement): RenderResult {
|
||||
)
|
||||
return {
|
||||
...result,
|
||||
rerender: (rerenderUi: ReactElement) =>
|
||||
rerender: (rerenderUi: ReactNode) =>
|
||||
rerender(
|
||||
<QueryClientProvider client={client}>
|
||||
<Router>{rerenderUi}</Router>
|
||||
|
@ -19,7 +19,7 @@ type RoutesDefinition = {
|
||||
build: BuildFn;
|
||||
};
|
||||
};
|
||||
type BuildFn = (params: unknown) => string;
|
||||
type BuildFn = (params: never) => string;
|
||||
type ParamsFromBuildFn<BF extends BuildFn> = Parameters<BF>[0] extends {
|
||||
params: infer Params;
|
||||
} ? {
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"helpers.jsx","sourceRoot":"","sources":["../../../../client/test/vitest/helpers.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAC3D,OAAO,EAAE,IAAI,EAA2C,MAAM,KAAK,CAAA;AACnE,OAAO,EAAE,WAAW,EAAoB,MAAM,UAAU,CAAA;AACxD,OAAO,EAAE,aAAa,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAA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MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,CAAA;AACvC,CAAC;AAED,SAAS,SAAS,CAChB,MAAmB,EACnB,KAAY,EACZ,eAAwD;IAExD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;QACtD,MAAM,IAAI,KAAK,CACb,yCACE,KAAK,CAAC,MACR,mCAAmC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAC3E,CAAA;IACH,CAAC;IAED,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,IAAI,EAAE,CAAA;IAE3C,MAAM,QAAQ,GAAyD;QACrE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,eAAe,CAAC;QAChD,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,eAAe,CAAC;QAClD,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,eAAe,CAAC;QAChD,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,eAAe,CAAC;KACvD,CAAA;IAED,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAA;AACpC,CAAC"}
|
@ -9,6 +9,16 @@
|
||||
],
|
||||
"declaration": true,
|
||||
"strict": false,
|
||||
"strictBindCallApply": true,
|
||||
"alwaysStrict": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
// See https://github.com/wasp-lang/wasp/issues/2056 before activating this:
|
||||
// "useUnknownInCatchVariables": true,
|
||||
// The following 3 stict options will require more work:
|
||||
// "noImplicitAny": true,
|
||||
// "strictNullChecks": true,
|
||||
// "strictPropertyInitialization": true,
|
||||
// Overriding this because we want to use top-level await
|
||||
"module": "esnext",
|
||||
"target": "es2017",
|
||||
|
@ -1,6 +1,6 @@
|
||||
app TodoTypescript {
|
||||
wasp: {
|
||||
version: "^0.13.0"
|
||||
version: "^0.14.0"
|
||||
},
|
||||
title: "ToDo TypeScript",
|
||||
|
||||
|
@ -40,7 +40,7 @@ export const MainPage = ({ user }: { user: AuthUser }) => {
|
||||
<Link to="/chat">Wonna chat?</Link>
|
||||
{user && (
|
||||
<h1>
|
||||
{getFirstProviderUserId(user)}
|
||||
{user.getFirstProviderUserId()}
|
||||
{`'s tasks :)`}
|
||||
</h1>
|
||||
)}
|
||||
|
@ -40,21 +40,12 @@ test('handles rendering in context', () => {
|
||||
const { mockQuery } = mockServer()
|
||||
|
||||
const mockUser = {
|
||||
id: 12,
|
||||
auth: {
|
||||
id: '123',
|
||||
userId: 12,
|
||||
identities: [
|
||||
{
|
||||
authId: '123',
|
||||
providerName: 'email',
|
||||
providerUserId: 'elon@tesla.com',
|
||||
providerData: '',
|
||||
},
|
||||
],
|
||||
identities: {
|
||||
username: {
|
||||
id: 'Elon'
|
||||
},
|
||||
},
|
||||
address: '',
|
||||
} satisfies AuthUser
|
||||
} as AuthUser
|
||||
|
||||
test('handles mock data', async () => {
|
||||
mockQuery(getTasks, mockTasks)
|
||||
|
@ -7,7 +7,7 @@ export const webSocketFn: WebSocketDefinition<
|
||||
InterServerEvents
|
||||
> = (io, context) => {
|
||||
io.on('connection', (socket) => {
|
||||
const username = getFirstProviderUserId(socket.data.user) ?? 'Unknown'
|
||||
const username = socket.data.user?.getFirstProviderUserId() ?? 'Unknown'
|
||||
console.log('a user connected: ', username)
|
||||
|
||||
socket.on('chatMessage', async (msg) => {
|
||||
|
Loading…
Reference in New Issue
Block a user