# With typescript how can I directly use the types created by "dfx generate"?

**URL:** <https://forum.dfinity.org/t/with-typescript-how-can-i-directly-use-the-types-created-by-dfx-generate/17896>\
**Category:** Developers\
**Created:** [January 10, 2023, 12:04pm UTC](https://forum.dfinity.org/t/with-typescript-how-can-i-directly-use-the-types-created-by-dfx-generate/17896 "2023-01-10T12:04:19Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![anon74414410](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@anon74414410](https://forum.dfinity.org/u/anon74414410)\
**Post date:** [January 10, 2023, 9:45pm UTC](https://forum.dfinity.org/t/with-typescript-how-can-i-directly-use-the-types-created-by-dfx-generate/17896/3 "2023-01-10T21:45:30Z")

</div>

You can accomplish the main changes of preventing the default export and avoiding the canisterId issue through `dfx.json` configs.

```json
"example": {
  "declarations": {
    "node_compatibility": true,
     "env_override": ""
  }
}
```

---

_[View the full topic](https://forum.dfinity.org/t/with-typescript-how-can-i-directly-use-the-types-created-by-dfx-generate/17896)._
