Luke Wyman
07/24/2021, 6:09 AMconst authStack = new AuthStack(app, 'auth');
new ApiStack(app, 'api', { auth: authStack.auth });
Gives me an error message of:
Argument of type '{ auth: sst.Auth; }' is not assignable to parameter of type 'StackProps'.
Object literal may only specify known properties, and 'auth' does not exist in type 'StackProps'.
I'm on sst version 0.35.1
Luke Wyman
07/24/2021, 6:37 AMexport default class ApiStack extends sst.Stack {
constructor(scope: cdk.Construct, id: string, auth: sst.Auth, props?: cdk.StackProps) {
super(scope, id, props);
Luke Wyman
07/24/2021, 6:37 AMFrank
Luke Wyman
07/24/2021, 3:50 PMauth
parameter, rather than specify the auth
in the StackProps
. I couldn't get StackProps
to recognize an auth
property.
I did get the thing to work, which is what's important at the end of the day. Just trying to scratch this itch as to why my code won't behave like the example.Frank
David Martin
07/26/2021, 6:41 PMexport default class AppSyncStack extends sst.Stack {
constructor(
scope: sst.App,
id: string,
table: sst.Table,
props?: sst.StackProps
) {
super(scope, id, props);
…Frank
Frank
StackProps
, but for that you’d need to create an interface that extends sst.StackProps
with the new table
field. It’s definitely more work.