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

add type-hinting for reserved properties #79

Closed
wants to merge 84 commits into from

Conversation

mindplay-dk
Copy link
Contributor

I attempted to add type-checking for key and the life-cycle attributes.

@andrewiggins can you take a look?

This works towards #36 but doesn't complete it - we still need types for for HTML/SVG attributes.

Jorge Bucaran and others added 30 commits May 16, 2017 20:52
Before, with patch as an attribute of h, patch was not
available to be called recursively. Fixed that, and also use
module.exports rather than es6 module export syntax, to make
it independent of babel-use
Fix scope availability of patch function
- Fix prop diffing for value and checked attributes. Close jorgebucaran#6.
NPM 5 has the new lock file format which replaces the need for yarn.
Use long command line options and sort the commands to help with debugging.
The decision is that deterministic dependencies are not desired
currently due to the additional complexity.
Ensure that the lock file is not checked in the future either.
Jorge Bucaran and others added 22 commits November 5, 2017 01:44
* remove default container argument; update tests and `README.md` to reflect the change
* changed the argument order of `patch` and adjusted the terminlogy and README, per discussion in jorgebucaran#40
* add failing test for passing numbers in styles
* handle numbers correctly in styles
* added tests for falsey attribute value handling
* set attribute to blank string if === true
…pe-arguments; also, make `patch` accept `Element` rather than `HTMLElement`, because an `SVGElement` is not an `HTMLElement` (jorgebucaran#59)
Properties take precedence over attributes.

Props now correctly omit the `value` attribute from the expected markup - because we're now updating the property, which is not the same as updating the attribute.

Elements with falsey values now uses an attribute for the tests, rather than `value`, which is a property.
- Breaking: change the type of onremove from returning a
  function that receives `done`, to a function that takes
  both the element and `done`. onremove(element, done).
…the test that was already in place made an assertion about the state of a var `removed`, but this var was only initialized and never actually changed; the test wasn't proving anything.
- Add new ondestroy lifecycle event called both for nodes
  that are directly removed or removed as a result of a
  parent (any ancestor) node being removed.

- Breaking: change the type of onremove from returning a
  function that receives `done`, to a function that takes
  both the element and `done`. onremove(element, done).
Add ondestroy & refactor functions in show order.
@mindplay-dk mindplay-dk added the types Strings, numbers, booleans label Jan 3, 2018
@codecov-io
Copy link

Codecov Report

Merging #79 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #79   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           2      2           
  Lines         119    119           
  Branches       38     38           
=====================================
  Hits          119    119

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update acfe0c8...b736a70. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.