TypeScript support
See original GitHub issueHi,
I want to open a pull request to look at typescript support for this project. The current instructions do not mention that you have to modify the Webpack configuration to use the ‘ts’ extension. The updated documentation is given here below.
const path = require('path');
const { createDefaultConfig } = require('@open-wc/building-webpack');
const merge = require('webpack-merge');
const config = createDefaultConfig({
input: path.resolve(__dirname, './index.html'),
});
module.exports = merge(config, {
resolve: {
extensions: ['.ts']
}
})
Another solution would also to have typescript support as a optional “opt-in” approach. That would make it easier to use. Happy to do the work and the pull request. Thoughts?
const config = createDefaultConfig({
input: path.resolve(__dirname, './index.html'),
withTypeScript: true
});
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:22 (14 by maintainers)
Top Results From Across the Web
TypeScript: JavaScript With Syntax For Types.
TypeScript extends JavaScript by adding types to the language. TypeScript speeds up your development experience by catching errors and providing fixes ...
Read more >TypeScript - Wikipedia
TypeScript supports definition files that can contain type information of existing JavaScript libraries, much like C++ header files can describe the ...
Read more >TypeScript Programming with Visual Studio Code
TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. It offers classes, modules, and interfaces to help you build robust...
Read more >TypeScript | IntelliJ IDEA Documentation - JetBrains
IntelliJ IDEA supports developing, running, and debugging TypeScript source code. IntelliJ IDEA recognizes .ts and .tsx files and provides ...
Read more >TypeScript Introduction - W3Schools
TypeScript is JavaScript with added syntax for types. ... as Visual Studio Code, have built-in TypeScript support and can show errors as you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I also propose to have an application template with TS. 😄
@difosfor we had an issue in the testing-helper where the typescript declarations files did not end up in the published npm package 🙈 it is solved now 👍 (version 1.6.2)