Ash N
04/04/2022, 11:57 PMtable
value as it does not exist and I'm not sure how to pass or type the value/reference correctly. I haven't yet added any checks for undefined
and am not certain if StackProps
is the right value here.
How do I let the code know that table
will exist as a property on props
with the correct type, and where/how does this value get passed through?
export default class ApiStack extends sst.Stack {
// Public reference to the API
api;
constructor(scope: <http://sst.App|sst.App>, id: string, props?: sst.StackProps) {
super(scope, id, props);
// Property 'table' does not exist on type 'StackProps | undefined'.ts(2339)
const { table } = props;
// ...
Adam Fanello
04/05/2022, 12:22 AMinterface
that extends sst.StackProps
and add properties, such as table: sst.Table
.Ash N
04/05/2022, 2:52 AM