Francis Menguito
05/13/2022, 1:21 PMModule '"@serverless-stack/resources"' has no exported member 'TableFieldType'.ts(2305)
manitej
05/13/2022, 1:22 PMnew Table(this, "Notes", {
fields: {
userId: TableFieldType.STRING,
noteId: TableFieldType.STRING,
},
primaryIndex: { partitionKey: "noteId", sortKey: "userId" },
});
using this?Francis Menguito
05/13/2022, 1:23 PMmanitej
05/13/2022, 1:23 PMstring
Francis Menguito
05/13/2022, 1:23 PMFrancis Menguito
05/13/2022, 1:23 PMmanitej
05/13/2022, 1:23 PMnew Table(this, "Notes", {
fields: {
userId: "string",
noteId: "string",
},
primaryIndex: { partitionKey: "noteId", sortKey: "userId" },
});
Francis Menguito
05/13/2022, 1:24 PMmanitej
05/13/2022, 1:25 PMFrancis Menguito
05/13/2022, 1:25 PMFrancis Menguito
05/13/2022, 1:26 PMts
manitej
05/13/2022, 1:26 PMFrancis Menguito
05/13/2022, 1:26 PMFrancis Menguito
05/13/2022, 1:27 PMmanitej
05/13/2022, 1:27 PMFrancis Menguito
05/13/2022, 1:29 PMFrancis Menguito
05/13/2022, 1:29 PMmanitej
05/13/2022, 1:30 PMFrancis Menguito
05/13/2022, 1:48 PMFrank
Construct
. You can use <http://sst.App|sst.App>
as the scope, for example:
import { App } from "@serverless-stack/resources;
...
constructor(scope: App, id: string, props: StackProps) {
...
Hitesh Balwani
05/22/2022, 12:22 PMConstruct
is mistakenly gettting picked up by IDE when we ask it to infer types. This is happening because the guide is in js but we are implementing in TS