@zhongguo168a/yxeditor-common 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +12 -12
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HorizontalTextAlignment, VerticalTextAlignment, Scheduler, Prefab, Node, Component, ISchedulable, AssetManager, Asset, SpriteAtlas, Vec2, Vec3, Vec4 } from 'cc';
|
|
2
2
|
|
|
3
|
-
interface
|
|
3
|
+
interface IError {
|
|
4
4
|
isCancel(): boolean;
|
|
5
5
|
is(ident: string): boolean;
|
|
6
6
|
toString(): string;
|
|
@@ -10,7 +10,7 @@ interface error {
|
|
|
10
10
|
* 链式错误
|
|
11
11
|
* err1 <argA=val&argB=val>
|
|
12
12
|
*/
|
|
13
|
-
declare class LinkError {
|
|
13
|
+
declare class LinkError implements IError {
|
|
14
14
|
next: LinkError;
|
|
15
15
|
ident: string;
|
|
16
16
|
args: {
|
|
@@ -40,7 +40,7 @@ declare class ErrorUtil {
|
|
|
40
40
|
warp(err: LinkError, ident: any, args?: {
|
|
41
41
|
[key: string]: any;
|
|
42
42
|
}): LinkError;
|
|
43
|
-
to(err:
|
|
43
|
+
to(err: IError): LinkError;
|
|
44
44
|
}
|
|
45
45
|
declare const errorutil: ErrorUtil;
|
|
46
46
|
|
|
@@ -124,7 +124,7 @@ declare class UIManager {
|
|
|
124
124
|
* 获取UI对象池中的一个对象
|
|
125
125
|
* @param key
|
|
126
126
|
*/
|
|
127
|
-
getPoolObject(key: string): [any,
|
|
127
|
+
getPoolObject(key: string): [any, IError];
|
|
128
128
|
/**
|
|
129
129
|
* 返回UI到对象池中
|
|
130
130
|
* @param key
|
|
@@ -141,7 +141,7 @@ declare class UIManager {
|
|
|
141
141
|
* 引用计数+1
|
|
142
142
|
* @param key
|
|
143
143
|
*/
|
|
144
|
-
getSingle(key: string): [any,
|
|
144
|
+
getSingle(key: string): [any, IError];
|
|
145
145
|
/**
|
|
146
146
|
* 返还UI对象
|
|
147
147
|
* 引用计数-1,当引用计数等于0时,放入待清理列表
|
|
@@ -1848,13 +1848,13 @@ declare class MathUtil {
|
|
|
1848
1848
|
declare const mathutil: MathUtil;
|
|
1849
1849
|
|
|
1850
1850
|
declare class ResUtil {
|
|
1851
|
-
loadResource(path: string): Promise<[any,
|
|
1852
|
-
preloadResource(path: string): Promise<[any,
|
|
1853
|
-
loadBubble(bundle: string): Promise<[AssetManager.Bundle,
|
|
1854
|
-
loadBubbleItem(bubble: AssetManager.Bundle, path: string, type: any): Promise<[any,
|
|
1855
|
-
loadAtlas(path: string): Promise<[SpriteAtlas,
|
|
1851
|
+
loadResource(path: string): Promise<[any, IError]>;
|
|
1852
|
+
preloadResource(path: string): Promise<[any, IError]>;
|
|
1853
|
+
loadBubble(bundle: string): Promise<[AssetManager.Bundle, IError]>;
|
|
1854
|
+
loadBubbleItem(bubble: AssetManager.Bundle, path: string, type: any): Promise<[any, IError]>;
|
|
1855
|
+
loadAtlas(path: string): Promise<[SpriteAtlas, IError]>;
|
|
1856
1856
|
getByPath(path: string, type: any): any;
|
|
1857
|
-
loadByPath(path: string, type: any): Promise<[any,
|
|
1857
|
+
loadByPath(path: string, type: any): Promise<[any, IError]>;
|
|
1858
1858
|
loadByPathCallback(path: string, type: any, callback: (any: any, error: any) => void): void;
|
|
1859
1859
|
}
|
|
1860
1860
|
declare var resutil: ResUtil;
|
|
@@ -1939,4 +1939,4 @@ declare function parsePlist(plist: any, texture: any): SpriteAtlas;
|
|
|
1939
1939
|
declare function loadAtlas(url: any, callback: any): void;
|
|
1940
1940
|
|
|
1941
1941
|
export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, Controller, ControllerDict, ControllerSet, ConvertUtil, DictIterator, DictNode, DictSource, Dictionary, Dispatcher, ErrorUtil, EventItem, EventManager, EventUtil, Factory, FloatUtil, GeometryUtil, IdentUtil, LOGGER_EVENT, LinkError, List, ListIterator, ListNode, ListSource, Listener, LogLevel, LogManager, Logger, MapUtil, MathUtil, Model, Module, NetUtil, Page, PageController, PageEvent, PageLayer, PageList, PageRepo, PageState, PathUtil, Pool, RandUtil, Route, SampleCallbackList, SamplePool, ScaleUtil, SimpleModel, StringUtil, TimeUtil, Timer, TreeIterator, TreeNode, TreeNodePlugin, TreeRoot, TreeRootPlugin, UIManager, UIObjectDict, UIPoolConfig, UISingleConfig, UIUtil, ViewController, XAssetManager, XEvent, arrayutil, assetx, bitutil, convertutil, ctrlrepo, errorutil, eventmgr, eventutil, floatutil, formatutil, geoutil, identutil, loadAtlas, logmgr, maputil, mathutil, netutil, pagerepo, parseAtlas, parsePlist, pathutil, randutil, resutil, scaleutil, stringutil, timer, timeutil, uidict, uimgr, uiutil };
|
|
1942
|
-
export type { CreatorFunction, DisposeFunction, IController, IEventManager, IExtend, IListItem, IModel, IModule, IModuleSample, ITreeListItem, RecycleFunction
|
|
1942
|
+
export type { CreatorFunction, DisposeFunction, IController, IError, IEventManager, IExtend, IListItem, IModel, IModule, IModuleSample, ITreeListItem, RecycleFunction };
|