webdoc-labs / webdoc

Documentation generator for the web
https://www.webdoclabs.com
Other
79 stars 9 forks source link

Lack of Type Inference messing with ESLint Rule #72

Closed bigtimebuddy closed 3 years ago

bigtimebuddy commented 3 years ago

Here we have two examples of the same code. The first example adds the type : boolean and the second omits. We are enforcing a lint rule to hide type annotations for basic values @typescript-eslint/no-inferrable-types. Would be nice to infer basic types based on booleans, strings and numbers.

:+1: Type Correct in Webdoc

/**
 * Setting this to true will visually show the divs.
 *
 * @default false
 */
public debug: boolean = false;

:x: Type Missing in Webdoc

/**
 * Setting this to true will visually show the divs.
 *
 * @default false
 */
public debug = false;
ShukantPal commented 3 years ago

Inference improvements