Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved JSDoc comments for type correctness. #1161

Closed
wants to merge 45 commits into from
Closed

Improved JSDoc comments for type correctness. #1161

wants to merge 45 commits into from

Commits on Jul 4, 2018

  1. Improved JSDoc comments for type correctness.

    1. Improved JSDoc comments for better type check in VSCode with “implicitProjectConfig.checkJs": true” to enable type checking for JavaScript.
    2. Introduced JSDoc type casting to solve problems with type coercion.
    3. Escaped expando properties like “splitText” with [''] to resolve warning that property does not exist on object.
    4. Updated JSDoc comment for VNode. Attribures property was set to type “object”. Unfortunately JSDoc types “object” and “Object” get treated as type “any” by TypeScript. To indicate a generic object you have to use this signature: Object.<string, any>.
    5. Add type cast for Ctor being called with new keyword to avoid warning "Cannot use 'new' with an expression whose type lacks a call or construct signature".
    6. Added type casting where type is a function, but original value could be a string as well. This tells type checker that the value can be called.
    7. Added numerous type casts in diff.js to resolve type conflicts.
    8. Many types had to be cast to type “any” in oder to remedy conflicts where type coercion would happen during runtime in browser, but static type checkers can’t foresee.
    9. Type casting adds an extra pair of parens around the value being cast. But these are removed during minification.
    Wobbabits committed Jul 4, 2018
    Configuration menu
    Copy the full SHA
    adf8dd5 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2018

  1. Configuration menu
    Copy the full SHA
    26ea308 View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2018

  1. Changes to pass tsc --allowJs --checkJs

    Christopher J. Brody committed Jul 11, 2018
    Configuration menu
    Copy the full SHA
    e6573fa View commit details
    Browse the repository at this point in the history
  2. typescript@^2.9.2 update

    Christopher J. Brody committed Jul 11, 2018
    Configuration menu
    Copy the full SHA
    7d21d23 View commit details
    Browse the repository at this point in the history
  3. .gitignore ignore .*.swp

    Christopher J. Brody committed Jul 11, 2018
    Configuration menu
    Copy the full SHA
    b6eb3c9 View commit details
    Browse the repository at this point in the history
  4. package.json add checkjs script

    Christopher J. Brody committed Jul 11, 2018
    Configuration menu
    Copy the full SHA
    1e4140a View commit details
    Browse the repository at this point in the history
  5. Minor cleanup related to JSDoc fixes

    Christopher J. Brody committed Jul 11, 2018
    Configuration menu
    Copy the full SHA
    64e8503 View commit details
    Browse the repository at this point in the history
  6. separate import for other JSDoc param items

    Christopher J. Brody committed Jul 11, 2018
    Configuration menu
    Copy the full SHA
    e95c386 View commit details
    Browse the repository at this point in the history
  7. Merge pull request #1 from brodybits/cb-tsc-fix1

    Experimental tsc --checkJs & cleanup fixes (for discussion)
    Wobbabits authored Jul 11, 2018
    Configuration menu
    Copy the full SHA
    d2b7141 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2018

  1. Configuration menu
    Copy the full SHA
    c0ae1d4 View commit details
    Browse the repository at this point in the history
  2. Fix JSDoc cast in buildComponentFromVNode

    using separate const
    Christopher J. Brody committed Jul 16, 2018
    Configuration menu
    Copy the full SHA
    05a7ddc View commit details
    Browse the repository at this point in the history
  3. package.json use checkJs script name (camelCase)

    Christopher J. Brody committed Jul 16, 2018
    Configuration menu
    Copy the full SHA
    aca4d72 View commit details
    Browse the repository at this point in the history
  4. src/vdom/component-recycler.js remove param import

    (no longer needed)
    Christopher J. Brody committed Jul 16, 2018
    Configuration menu
    Copy the full SHA
    7f5735e View commit details
    Browse the repository at this point in the history
  5. src/component.js move JSDoc import

    Christopher J. Brody committed Jul 16, 2018
    Configuration menu
    Copy the full SHA
    5ebff59 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2018

  1. minor cleanup of JSDoc type in internal idiff

    Christopher J. Brody committed Jul 17, 2018
    Configuration menu
    Copy the full SHA
    dd17907 View commit details
    Browse the repository at this point in the history
  2. use internal consts to cleanup inline JSDoc types

    Christopher J. Brody committed Jul 17, 2018
    Configuration menu
    Copy the full SHA
    0387927 View commit details
    Browse the repository at this point in the history
  3. Improved JSDoc comments for type correctness.

    1. Improved JSDoc comments for better type check in VSCode with “implicitProjectConfig.checkJs": true” to enable type checking for JavaScript.
    2. Introduced JSDoc type casting to solve problems with type coercion.
    3. Escaped expando properties like “splitText” with [''] to resolve warning that property does not exist on object.
    4. Updated JSDoc comment for VNode. Attribures property was set to type “object”. Unfortunately JSDoc types “object” and “Object” get treated as type “any” by TypeScript. To indicate a generic object you have to use this signature: Object.<string, any>.
    5. Add type cast for Ctor being called with new keyword to avoid warning "Cannot use 'new' with an expression whose type lacks a call or construct signature".
    6. Added type casting where type is a function, but original value could be a string as well. This tells type checker that the value can be called.
    7. Added numerous type casts in diff.js to resolve type conflicts.
    8. Many types had to be cast to type “any” in oder to remedy conflicts where type coercion would happen during runtime in browser, but static type checkers can’t foresee.
    9. Type casting adds an extra pair of parens around the value being cast. But these are removed during minification.
    Wobbabits authored and Christopher J. Brody committed Jul 17, 2018
    Configuration menu
    Copy the full SHA
    3a189fa View commit details
    Browse the repository at this point in the history
  4. Fixed problem to not require type cast for constructor.

    Wobbabits authored and Christopher J. Brody committed Jul 17, 2018
    Configuration menu
    Copy the full SHA
    1ed6764 View commit details
    Browse the repository at this point in the history
  5. Changes to pass tsc --allowJs --checkJs

    Christopher J. Brody committed Jul 17, 2018
    Configuration menu
    Copy the full SHA
    37495b2 View commit details
    Browse the repository at this point in the history
  6. typescript@^2.9.2 update

    Christopher J. Brody committed Jul 17, 2018
    Configuration menu
    Copy the full SHA
    cc10b1c View commit details
    Browse the repository at this point in the history
  7. .gitignore ignore .*.swp

    Christopher J. Brody committed Jul 17, 2018
    Configuration menu
    Copy the full SHA
    6125010 View commit details
    Browse the repository at this point in the history
  8. package.json add checkJs

    Christopher J. Brody committed Jul 17, 2018
    Configuration menu
    Copy the full SHA
    972d6b3 View commit details
    Browse the repository at this point in the history
  9. Minor cleanup related to JSDoc fixes

    Christopher J. Brody committed Jul 17, 2018
    Configuration menu
    Copy the full SHA
    976ac4a View commit details
    Browse the repository at this point in the history
  10. separate import for other JSDoc param items

    Christopher J. Brody committed Jul 17, 2018
    Configuration menu
    Copy the full SHA
    78ea2ef View commit details
    Browse the repository at this point in the history
  11. Fix JSDoc cast in buildComponentFromVNode

    using separate const
    Christopher J. Brody committed Jul 17, 2018
    Configuration menu
    Copy the full SHA
    bce5afa View commit details
    Browse the repository at this point in the history
  12. minor cleanup of JSDoc type in internal idiff

    Christopher J. Brody committed Jul 17, 2018
    Configuration menu
    Copy the full SHA
    5ac7548 View commit details
    Browse the repository at this point in the history
  13. use internal consts to cleanup inline JSDoc types

    Christopher J. Brody committed Jul 17, 2018
    Configuration menu
    Copy the full SHA
    9f82f5b View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2018

  1. Configuration menu
    Copy the full SHA
    0d2aea9 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #2 from brodybits/cb-tsc-fix2

    More checkJs & JSDoc fixes
    Wobbabits authored Jul 18, 2018
    Configuration menu
    Copy the full SHA
    170109b View commit details
    Browse the repository at this point in the history
  3. Changed text node type cast from 'any' to Node.

    1. A text Node is also of type Node. So we can cast to that instead of type 'any'.
    Wobbabits committed Jul 18, 2018
    Configuration menu
    Copy the full SHA
    decf628 View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2018

  1. Use JSDoc types instead of property strings

    Christopher J. Brody committed Jul 22, 2018
    Configuration menu
    Copy the full SHA
    57a66e2 View commit details
    Browse the repository at this point in the history
  2. Fix JSDoc EventListener @typedef

    Christopher J. Brody committed Jul 22, 2018
    Configuration menu
    Copy the full SHA
    ab2359c View commit details
    Browse the repository at this point in the history
  3. src/dom/index.js move JSDoc import of Component

    Christopher J. Brody committed Jul 22, 2018
    Configuration menu
    Copy the full SHA
    59c4695 View commit details
    Browse the repository at this point in the history
  4. Inline some consts to reduce size

    Christopher J. Brody committed Jul 22, 2018
    Configuration menu
    Copy the full SHA
    67e5185 View commit details
    Browse the repository at this point in the history
  5. src/vdom/diff.js remove some inline JSDoc types

    (not needed)
    Christopher J. Brody committed Jul 22, 2018
    Configuration menu
    Copy the full SHA
    36f2a27 View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2018

  1. Configuration menu
    Copy the full SHA
    fb063cf View commit details
    Browse the repository at this point in the history
  2. Merge pull request #3 from brodybits/new-jsdoc-updates

    jsdoc updates rebased on upstream master
    Wobbabits authored Jul 25, 2018
    Configuration menu
    Copy the full SHA
    b479244 View commit details
    Browse the repository at this point in the history

Commits on Jul 26, 2018

  1. Configuration menu
    Copy the full SHA
    d4abe42 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #5 from rbiggs/revert-3-new-jsdoc-updates

    Revert "jsdoc updates rebased on upstream master"
    Wobbabits authored Jul 26, 2018
    Configuration menu
    Copy the full SHA
    8cc588d View commit details
    Browse the repository at this point in the history

Commits on Jul 30, 2018

  1. Fixed union type for VNode children.

    1. Cannot use union inside brackets. This was showing children as type `string | VNode[]` when it should have been `string[] | VNode[]`.
    Wobbabits committed Jul 30, 2018
    Configuration menu
    Copy the full SHA
    a2be058 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bfd9743 View commit details
    Browse the repository at this point in the history
  3. src/vdom/diff.js fixes to preserve original JS

    Christopher J. Brody committed Jul 30, 2018
    Configuration menu
    Copy the full SHA
    c24eccf View commit details
    Browse the repository at this point in the history
  4. src/vnode.js remove @ts-nocheck (not needed)

    Christopher J. Brody committed Jul 30, 2018
    Configuration menu
    Copy the full SHA
    09f9690 View commit details
    Browse the repository at this point in the history
  5. Fix JSDoc return type of vdom.getNodeProps()

    Co-authored-by: Robert Biggs <[email protected]>
    Co-authored-by: Christopher J. Brody <[email protected]>
    Wobbabits and Christopher J. Brody committed Jul 30, 2018
    Configuration menu
    Copy the full SHA
    c90f388 View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2018

  1. Merge pull request #4 from brodybits/cb-tsc-fix3

    Additional checkJS / JSDoc fixes
    Wobbabits authored Jul 31, 2018
    Configuration menu
    Copy the full SHA
    ce26426 View commit details
    Browse the repository at this point in the history