extism / assemblyscript-pdk

Extism Plug-in Development Kit (PDK) for AssemblyScript
BSD 3-Clause "New" or "Revised" License
7 stars 3 forks source link

Move .d.ts to .ts extension for index file #1

Closed bhelx closed 2 years ago

bhelx commented 2 years ago

I was getting error when trying to resolve the as-pdk module:

ERROR TS6054: File '~lib/@extism/as-pdk.ts' not found.
 import { Host } from '@extism/as-pdk';
                   ~~~~~~~~~~~~~~~~
 in assembly/index.ts(1,22)
FAILURE 1 parse error(s)

I resolved by changing the import to:

import { Host } from '@extism/as-pdk/index.d.ts';

But I think the proper fix is for the index file to be a .ts file and not a .d.ts file.

nilslice commented 2 years ago

Thanks! When you initially installed this before the fix, was it via npm?

bhelx commented 2 years ago

Thanks! When you initially installed this before the fix, was it via npm?

yes but i followed up by testing against my local fork