Visual Studio Code ships with built in TypeScript language support. Types and classes are recognized and code completion works out of the box. While Mobiscroll for Angular is compiled to JavaScript, the TypeScript definition files generated during compilation are also provided, so VSCode will recognize Mobiscroll types and classes as well.
Configuring type-ahead for typescript
To use type-ahead or code completion for Mobiscroll settings, make sure to import the correct type for the settings.
import { MbscCalendarOptions } from '@mobiscroll/angular';
// ...
options: MbscCalendarOptions = {
display: 'inline'
}
And voila, auto-suggest works 🎉
Supporting template files
This will not work automatically inside template files for custom elements. Thankfully, it can be easily solved by installing the Angular Language Service extension, no extra configuration is needed.
What's next?
For using components in Angular, read about configuring components in Mobiscroll for Angular