index.jsx
import React from 'react'
import ReactDOM from 'react-dom'
import Home from "./home";
const x:number = "aaa"
const x:number = "aaa"
const x:number = "aaa"
ReactDOM.render(<Home/>, document.getElementById('root'))
The build should fail due to: multiple identifiers of the same name (js) and invalid type (string to number variable) (ts).
Currently, parcel compiles successfully. How can I enforce a failure in such cases?
Minimal working project-example: https://github.com/stavalfi/learning-parcel-js
Using ts-loader
will do the trick.