docker-compose icon indicating copy to clipboard operation
docker-compose copied to clipboard

Support TypeScript + ESM

Open AlexZeitler opened this issue 1 year ago • 2 comments

fixes #276

AlexZeitler avatar May 10 '24 11:05 AlexZeitler

I included the mention of ESM in my post for completeness, though I do not think it plays any part here.

To resolve the issue, change the v2.d.ts to be:

/// <reference types="node" />
declare module 'docker-compose/dist/v2' {
  ...
  export default _default;
}

Then, all you need to do is add that to the includes in your tsconfig.json

{
  "include": [
    "**/*.ts",
    "../../node_modules/docker-compose/dist/v2.d.ts"
  ],
}

I'm just not sure if that is the best approach

jd-carroll avatar May 10 '24 15:05 jd-carroll

Please take a look at #278

jd-carroll avatar May 20 '24 23:05 jd-carroll