sparse-intern-71089
09/20/2023, 9:56 AMclever-sunset-76585
09/21/2023, 12:15 AMtypes/index.d.ts
?melodic-angle-86693
09/21/2023, 4:32 AMdeclare module "@bref.sh/layers" {
function fpmLayerArn(
region: string,
version: string,
architecture?: string,
): string;
}
melodic-angle-86693
09/21/2023, 6:32 AMmelodic-angle-86693
09/21/2023, 6:45 AMcompilerOptions.rootDirs
and compilerOptions.typeRoots
and still erroring 😕melodic-angle-86693
09/21/2023, 6:47 AMPULUMI_NODEJS_TYPESCRIPT=true PULUMI_NODEJS_TSCONFIG_PATH=tsconfig.json pulumi up
and it doesn’t workmelodic-angle-86693
09/21/2023, 6:59 AMstrict
and noImplicitAny
😕clever-sunset-76585
09/21/2023, 9:28 AMtypes/index.d.ts
and not your TS configuration. Also I see that the original source contains JSDoc for that function which should provide the type hints that your module is trying to provide. Are you simply trying to add type-safety for that function or trying to fix some other problem?melodic-angle-86693
09/21/2023, 9:29 AMmelodic-angle-86693
09/21/2023, 9:30 AMimport { fpmLayerArn } from "@bref.sh/layers";
// ...
export const wordpressServer = new aws.lambda.Function(
"wordpress-server",
{
role: wordpressServerRole.arn,
runtime: "provided.al2",
layers: [fpmLayerArn("us-east-1", "8.2")],
s3Bucket: wordpressBucket.bucket,
s3Key: wordpressCode.key,
handler: "lambda-handler.php",
memorySize: 1024,
sourceCodeHash: wordpressCode.sourceHash.toString(),
},
{
dependsOn: [wordpressServerRole, wordpressBucket, wordpressCode],
},
);
melodic-angle-86693
09/21/2023, 9:30 AMmelodic-angle-86693
09/21/2023, 9:41 AMnoImplicitAny
for now. I’ll try to look into this in the future though. Thanks for helping me out here!clever-sunset-76585
09/21/2023, 10:14 AMtsconfig.json
file. Your module declaration is indeed correct. You might try include: ["***/**.ts"]
in your config.ripe-gpu-76158
12/08/2023, 10:16 PM<project_root>/
-- tsconfig.json
-- typings/
-- <module_name>/
-- index.d.ts
and then in your tsconfig.json
add the typings
dir to the typeRoots
list
{
"compilerOptions": {
"typeRoots": [
"./node_modules/@types",
"./typings"
]
}
}