mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 06:41:14 +00:00
Hide the private API of the NodeJS integration
Hide it behind a `private_api` property in the module export.
This commit is contained in:
parent
4bc72ec6b3
commit
f6d8f78e3f
2 changed files with 8 additions and 6 deletions
|
@ -119,6 +119,8 @@ class ArrayModel<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
native.ArrayModel = ArrayModel;
|
|
||||||
|
|
||||||
module.exports = native;
|
module.exports = {
|
||||||
|
private_api: native,
|
||||||
|
ArrayModel: ArrayModel
|
||||||
|
};
|
||||||
|
|
|
@ -110,14 +110,14 @@ assert.equal(instance.hello, 40);
|
||||||
assert.equal(instance.binding_dep, 100);
|
assert.equal(instance.binding_dep, 100);
|
||||||
|
|
||||||
// Half the animation
|
// Half the animation
|
||||||
sixtyfpslib.mock_elapsed_time(600);
|
sixtyfpslib.private_api.mock_elapsed_time(600);
|
||||||
assert.equal(instance.hello, 50);
|
assert.equal(instance.hello, 50);
|
||||||
assert.equal(instance.binding_dep, 125);
|
assert.equal(instance.binding_dep, 125);
|
||||||
// Remaining half
|
// Remaining half
|
||||||
sixtyfpslib.mock_elapsed_time(600);
|
sixtyfpslib.private_api.mock_elapsed_time(600);
|
||||||
assert.equal(instance.hello, 60);
|
assert.equal(instance.hello, 60);
|
||||||
assert.equal(instance.binding_dep, 150);
|
assert.equal(instance.binding_dep, 150);
|
||||||
sixtyfpslib.mock_elapsed_time(100);
|
sixtyfpslib.private_api.mock_elapsed_time(100);
|
||||||
assert.equal(instance.hello, 60);
|
assert.equal(instance.hello, 60);
|
||||||
assert.equal(instance.binding_dep, 150);
|
assert.equal(instance.binding_dep, 150);
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ assert.equal(instance.binding_dep, 150);
|
||||||
// querying the value (because te dirty event should cause the animation to start)
|
// querying the value (because te dirty event should cause the animation to start)
|
||||||
instance.condition = true;
|
instance.condition = true;
|
||||||
instance.hello = 30;
|
instance.hello = 30;
|
||||||
sixtyfpslib.mock_elapsed_time(600);
|
sixtyfpslib.private_api.mock_elapsed_time(600);
|
||||||
assert.equal(instance.hello, 45);
|
assert.equal(instance.hello, 45);
|
||||||
assert.equal(instance.binding_dep, 125);
|
assert.equal(instance.binding_dep, 125);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue