omi v5.0.1 - fix omi.d.ts error

This commit is contained in:
张磊 2018-11-26 10:28:43 +08:00
parent 4c88db8b5c
commit 2e663739b0
12 changed files with 24 additions and 24 deletions

View File

@ -166,8 +166,8 @@ declare namespace Omi {
function define(name: string, ctor: any): void;
function tag(name: string, pure?: boolean): (ctor: any) => void;
function tick(callback: function, scope?: any): void;
function nextTick(callback: function, scope?: any): void;
function tick(callback: () => void, scope?: any): void;
function nextTick(callback: () => void, scope?: any): void;
var options: {
vnode?: (vnode: VNode<any>) => void;

View File

@ -1,5 +1,5 @@
/**
* omi v5.0.0 http://omijs.org
* omi v5.0.1 http://omijs.org
* Omi === Preact + Scoped CSS + Store System + Native Support in 3kb javascript.
* By dntzhang https://github.com/dntzhang
* Github: https://github.com/Tencent/omi
@ -713,17 +713,17 @@
will emit
{op: replace, path: '/arr/1', value: arr_2}
{op: remove, path: '/arr/2'}
by default, the second operation would revoke the proxy, and this renders arr revoked.
by default, the second operation would revoke the proxy, and this renders arr revoked.
That's why we need to remember the proxies that are inherited.
*/
var revokableInstance = instance.proxifiedObjectsMap.get(newValue);
/*
Why do we need to check instance.isProxifyingTreeNow?
We need to make sure we mark revokables as inherited ONLY when we're observing,
We need to make sure we mark revokables as inherited ONLY when we're observing,
because throughout the first proxification, a sub-object is proxified and then assigned to
its parent object. This assignment of a pre-proxified object can fool us into thinking
that it's a proxified object moved around, while in fact it's the first assignment ever.
Checking isProxifyingTreeNow ensures this is not happening in the first proxification,
Checking isProxifyingTreeNow ensures this is not happening in the first proxification,
but in fact is is a proxified object moved around the tree
*/
if (revokableInstance && !instance.isProxifyingTreeNow) {
@ -801,7 +801,7 @@
this is an inherited proxy (an already proxified object that was moved around),
we shouldn't revoke it, because even though it was removed from path1, it is still used in path2.
And we know that because we mark moved proxies with `inherited` flag when we move them
it is a good idea to remove this flag if we come across it here, in deleteProperty trap.
it is a good idea to remove this flag if we come across it here, in deleteProperty trap.
We DO want to revoke the proxy if it was removed again.
*/
revokableProxyInstance.inherited = false;
@ -1509,7 +1509,7 @@
};
options.root.Omi = omi;
options.root.Omi.version = '5.0.0';
options.root.Omi.version = '5.0.1';
if (typeof module != 'undefined') module.exports = omi;else self.Omi = omi;
}());

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/**
* omi v5.0.0 http://omijs.org
* omi v5.0.1 http://omijs.org
* Omi === Preact + Scoped CSS + Store System + Native Support in 3kb javascript.
* By dntzhang https://github.com/dntzhang
* Github: https://github.com/Tencent/omi
@ -710,17 +710,17 @@ var JSONPatcherProxy = function () {
will emit
{op: replace, path: '/arr/1', value: arr_2}
{op: remove, path: '/arr/2'}
by default, the second operation would revoke the proxy, and this renders arr revoked.
by default, the second operation would revoke the proxy, and this renders arr revoked.
That's why we need to remember the proxies that are inherited.
*/
var revokableInstance = instance.proxifiedObjectsMap.get(newValue);
/*
Why do we need to check instance.isProxifyingTreeNow?
We need to make sure we mark revokables as inherited ONLY when we're observing,
We need to make sure we mark revokables as inherited ONLY when we're observing,
because throughout the first proxification, a sub-object is proxified and then assigned to
its parent object. This assignment of a pre-proxified object can fool us into thinking
that it's a proxified object moved around, while in fact it's the first assignment ever.
Checking isProxifyingTreeNow ensures this is not happening in the first proxification,
Checking isProxifyingTreeNow ensures this is not happening in the first proxification,
but in fact is is a proxified object moved around the tree
*/
if (revokableInstance && !instance.isProxifyingTreeNow) {
@ -798,7 +798,7 @@ operation.op = 'replace', operation.value = null;
this is an inherited proxy (an already proxified object that was moved around),
we shouldn't revoke it, because even though it was removed from path1, it is still used in path2.
And we know that because we mark moved proxies with `inherited` flag when we move them
it is a good idea to remove this flag if we come across it here, in deleteProperty trap.
it is a good idea to remove this flag if we come across it here, in deleteProperty trap.
We DO want to revoke the proxy if it was removed again.
*/
revokableProxyInstance.inherited = false;
@ -1506,7 +1506,7 @@ var omi = {
};
options.root.Omi = omi;
options.root.Omi.version = '5.0.0';
options.root.Omi.version = '5.0.1';
export default omi;
export { tag, WeElement, Component, render, h, h as createElement, options, define, observe, cloneElement, getHost, rpx, tick, nextTick, ModelView };

File diff suppressed because one or more lines are too long

View File

@ -893,7 +893,7 @@
ModelView: ModelView
};
options.root.Omi = omi;
options.root.Omi.version = '5.0.0';
options.root.Omi.version = '5.0.1';
if ('undefined' != typeof module) module.exports = omi; else self.Omi = omi;
}();
//# sourceMappingURL=omi.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "omi",
"version": "5.0.0",
"version": "5.0.1",
"description": "Next generation web framework.",
"main": "dist/omi.js",
"jsnext:main": "dist/omi.esm.js",

View File

@ -166,8 +166,8 @@ declare namespace Omi {
function define(name: string, ctor: any): void;
function tag(name: string, pure?: boolean): (ctor: any) => void;
function tick(callback: function, scope?: any): void;
function nextTick(callback: function, scope?: any): void;
function tick(callback: () => void, scope?: any): void;
function nextTick(callback: () => void, scope?: any): void;
var options: {
vnode?: (vnode: VNode<any>) => void;

View File

@ -32,7 +32,7 @@ const omi = {
}
options.root.Omi = omi
options.root.Omi.version = '5.0.0'
options.root.Omi.version = '5.0.1'
export default omi