# Aurelia development - TS in .js - another rabbit trail

**URL:** <https://discourse.aurelia.io/t/aurelia-development-ts-in-js-another-rabbit-trail/2615>\
**Category:** Help Requests\
**Created:** [June 4, 2019, 2:34pm UTC](https://discourse.aurelia.io/t/aurelia-development-ts-in-js-another-rabbit-trail/2615 "2019-06-04T14:34:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![airboss001](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/airboss001/32/719_2.png) [@airboss001](https://discourse.aurelia.io/u/airboss001)\
**Post date:** [June 4, 2019, 2:34pm UTC](https://discourse.aurelia.io/t/aurelia-development-ts-in-js-another-rabbit-trail/2615/1 "2019-06-04T14:34:54Z")

</div>

Gah, thought I would clone the aurelia-logging and play with some changes I talked about in another thread, and got sucked down another rabbit trail trying to just make a few simple changes.

So here is where I am at…

I can `gulp build` the project fine.  
But loading up in the editor the src file is .js, uses typescript extensions, and the editor (vscode) is complaining that x can only be used in .ts files.

So change the extension to .ts and now the editor is happy, but of course now you can’t build the project.

How does the Aurelia team have their development environments setup to be able to have TS intermixed in .js files and not get all the lint errors and proper intellisense?

---

<div class="post-metadata">

**Author:** ![Malexion](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/malexion/32/188_2.png) [@Malexion](https://discourse.aurelia.io/u/Malexion)\
**Post date:** [June 4, 2019, 7:45pm UTC](https://discourse.aurelia.io/t/aurelia-development-ts-in-js-another-rabbit-trail/2615/2 "2019-06-04T19:45:29Z")

</div>

Just a guess but it might have something to do with allowJs setting in tsconfig.json  
 ![image](https://canada1.discourse-cdn.com/flex027/uploads/aurelia/original/2X/e/e18ae62c518db8b34dafbc7a30328ff1bf4fd428.png)

---

<div class="post-metadata">

**Author:** ![airboss001](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/airboss001/32/719_2.png) [@airboss001](https://discourse.aurelia.io/u/airboss001)\
**Post date:** [June 4, 2019, 9:21pm UTC](https://discourse.aurelia.io/t/aurelia-development-ts-in-js-another-rabbit-trail/2615/3 "2019-06-04T21:21:57Z")

</div>

Thanks, will try that!  
Okay, so that allowed me another step forward.

Now there was another conflicting switch in the tsconfig.json:

```auto
"declaration": true,

```

removed that and seems to compile and still create the type file in dist.

---

<div class="post-metadata">

**Author:** ![airboss001](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/airboss001/32/719_2.png) [@airboss001](https://discourse.aurelia.io/u/airboss001)\
**Post date:** [June 6, 2019, 1:24pm UTC](https://discourse.aurelia.io/t/aurelia-development-ts-in-js-another-rabbit-trail/2615/4 "2019-06-06T13:24:55Z")

</div>

So I don’t know what changed, but going back to this I can’t get the errors for ‘types can only be used in .ts files’ to go away now in the editor.

As well, the tsconfig.json gives an error about overwriting the input file when using allowJs.

Surely it can’t be this hard to just clone/edit/build an official Aurelia package. I have to have something miss configured somewhere.
