Closed Seldszar closed 4 years ago
What typescript version do you use? Have you compiled in ^3.8.2 ?
Tried with 3.8.3 and 3.9.2.
It's look good to me! But I think it might be better if we can add ts related notes to readme! like this:
If you use typescript, you need to append an option in
tsconfig.json
:{ "compilerOptions": { "esModuleInterop": true } }
related to #177
@Seldszar I created a TS integration directory at /test/ts-module-integration
that uses the same version of TS but it seems to have access to body
. Could you please check to see if this is the case for you as well?
Tested just now and I have access to body
as well.
I'm going to close this until we determine that this or another type change is needed. Thanks!
When installing the package, the ambient declaration didn't seem to be applied. I updated the file by using the same approach as the
koa-bodyparser
package does (https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/koa-bodyparser/index.d.ts). After this change, I was able to access thebody
andfiles
properties.