@rbxts/app-forge 0.1.9 → 0.2.0
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/out/decorator.d.ts +4 -3
- package/out/decorator.luau +5 -2
- package/package.json +1 -1
package/out/decorator.d.ts
CHANGED
|
@@ -7,11 +7,12 @@ export declare const AppRegistry: Map<string, Types.AppRegistry>;
|
|
|
7
7
|
export declare function App(props: Types.AppRegistryProps): <T extends new (props: Types.MainProps) => Args>(constructor: T) => T;
|
|
8
8
|
export declare abstract class Args {
|
|
9
9
|
readonly Forge: AppForge;
|
|
10
|
+
readonly props: AppProps & {
|
|
11
|
+
px: ReturnType<typeof usePx>;
|
|
12
|
+
};
|
|
10
13
|
readonly root: ReactRoblox.Root | undefined;
|
|
11
|
-
readonly props: AppProps;
|
|
12
|
-
readonly name: AppNames[number];
|
|
13
14
|
readonly bind: React.Binding<boolean>;
|
|
14
|
-
readonly
|
|
15
|
+
readonly name: AppNames[number];
|
|
15
16
|
constructor(props: Types.MainProps);
|
|
16
17
|
abstract render(): JSX.Element;
|
|
17
18
|
}
|
package/out/decorator.luau
CHANGED
|
@@ -33,12 +33,15 @@ do
|
|
|
33
33
|
if not (name ~= "" and name) then
|
|
34
34
|
error("App name is required in Args constructor")
|
|
35
35
|
end
|
|
36
|
+
local px = usePx(target)
|
|
36
37
|
self.Forge = forge
|
|
37
38
|
self.root = root
|
|
38
|
-
|
|
39
|
+
local _object = table.clone(props)
|
|
40
|
+
setmetatable(_object, nil)
|
|
41
|
+
_object.px = px
|
|
42
|
+
self.props = _object
|
|
39
43
|
self.name = name
|
|
40
44
|
self.bind = forge:getBind(name)
|
|
41
|
-
self.px = usePx(target)
|
|
42
45
|
end
|
|
43
46
|
end
|
|
44
47
|
return {
|