Version 2
What is new? Migration Guide From V1
Getting Started
Understanding WinnetouJs Setting Up
Constructos
Creating Constructos Advanced Options Lazy Loading
Mutables
Constructos State Management Case: Custom State Management System Winnetou FX
Addons
Winnetou Selectors Winnetou Router App Translations CSS Sass Built-in Transpiler SVG Icons Color Themes
Extras
Useful JsDoc Syntax
Plugins
Creating Plugins SlideScreen Official Plugin Animate Official Plugin
Compiling to Production
WBR
API Change Log Git Hub Pull Requests Guidelines Get in touch
Extras

Using Jsdoc to get type checking

To increase the power of javascript without having to add yet another layer of abstraction, WinnetouJs adopted jsdoc. Jsdoc in addition to adding useful comments in the code, can also provide rich IntelliSense.

To lean more about Visual Studio Code, see this.

To lean JsDoc, see this.

createCard.js

        
/**
*
* @param {string} name User name of client
* @param {string} phone The phone number
* @param {string} addr The current address
* @param {Number} age The age of client
*/
export function createCard(name, phone, addr, age) {
    let color = age >= 18 ? "blue" : "red";
    card({
        color_class: color,
        profileName: name,
        age,
        phone,
        addr,
    }).create("#app");
}