Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.

Commit ad8eec5

Browse files
committed
JSDoc improvements.
1. Improved JSDoc comments for h, union and runtime times for better Intellisense.
1 parent 2b1739a commit ad8eec5

File tree

6 files changed

+12
-5
lines changed

6 files changed

+12
-5
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
# composi/core Changelog
22

3+
## 1.6.14 (September 27, 2019)
4+
5+
* Made improvements to JSDocs comments for better Intellisense for `h`, `union` and runtime types.
6+
37
## 1.6.13 (September 27, 2019)
48

59
### src/index.js
610

11+
* Made types State, Message and Send importable by projects.
12+
* Cleaned up type export.
13+
714
## 1.6.13 (September 27, 2019)
815

916
* Make types State, Message and Send importable by projects. Cleaned up type export.

dist/composi-core.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/composi-core.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/h.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { createVNode, createTextVNode } from './vnode'
22

33
/**
4-
* Creates a virtual node representing an element node or text node to be created.
4+
* Creates a virtual node representing an element node or text node to be created. This function must be imported into any file that contains JSX. Babel uses this function to convert JSX into JavaScript.
55
* @typedef {import('./vnode').VNode} VNode
66
* @param {string | Function} type
77
* @param {Object.<string, any>} [props]

src/runtime.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
/**
1111
* @typedef {(State) => void} Effect A function to run at startup.
12-
* @typedef {[State, Effect] | [State] | any[] | void} InitResult Return result of program init method.
12+
* @typedef {[State, Effect] | any[] | void} InitResult Return result of program init method.
1313
*/
1414
/**
1515
* @typedef {Object<string, any>} Program A program to run.

src/union.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function createUnion(types) {
3131
}
3232

3333
/**
34-
* Create a union of types for matching up with functions.
34+
* Create a union of types for matching up with functions. This is used to define actions for the `update` method of a runtime program.
3535
* @param {...string} types
3636
*/
3737
export function union(...types) {

0 commit comments

Comments
 (0)