Tonny (sstNerd)
12/05/2021, 3:55 AMconstructor(scope: <http://sst.App|sst.App>, id: string, props?: sst.StackProps) {
super(scope, id, props);
const { table } = props;
And then I’m getting TS errors b/c table
is not a “typed” property under the sst.StackProps
. That said, what would be the solution here? I was betting on create my own type (kinda like my own type but extending from the sst.StackProps
somehow and also append a table
property and whatever else need across the guide but idk if that’s how it should be in fact, any recommendation?Ross Coundon
12/05/2021, 7:38 AMFrank
StackProps
with the table
prop. An example here https://docs.serverless-stack.com/constructs/Api#sharing-an-api-across-stacks
2. Pass in the table
directly instead of wrapping it in props
constructor(scope: <http://sst.App|sst.App>, id: string, table: sst.Table) {
Frank
Ross Coundon
12/05/2021, 10:41 AMTonny (sstNerd)
12/05/2021, 11:19 PM