More typescript stuff
This commit is contained in:
parent
69a0e74619
commit
16cbc612a5
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
local_conf.lua
|
||||
11
core/input.d.ts
vendored
11
core/input.d.ts
vendored
@ -3,13 +3,4 @@ interface Subscription{
|
||||
off():void;
|
||||
}
|
||||
|
||||
export enum inputType{
|
||||
clicked = "clicked",
|
||||
keypressed = "keypressed",
|
||||
hover = "hover",
|
||||
mousepressed = "mousepressed",
|
||||
mousereleased = "mousereleased",
|
||||
dragged = "dragged"
|
||||
}
|
||||
|
||||
export function input(it:inputType,cb:(x?:number,y?:number)=>void,doff?:boolean,x?:number,y?:number,w?:number,h?:number): Subscription;
|
||||
export default function input(it:string,cb:(x?:number,y?:number)=>void,doff?:boolean,x?:number,y?:number,w?:number,h?:number): Subscription;
|
||||
@ -506,4 +506,6 @@ function input.eventHandlers.mousemoved(x, y, dx, dy)
|
||||
return captured
|
||||
end
|
||||
|
||||
--Typescript
|
||||
input.input = input
|
||||
return input
|
||||
9
helium.d.ts → init.d.ts
vendored
9
helium.d.ts → init.d.ts
vendored
@ -21,12 +21,13 @@ interface HeliumElement{
|
||||
view: view;
|
||||
state: state;
|
||||
parameters: parameters;
|
||||
draw(x:number,y:number): null;
|
||||
undraw(): null;
|
||||
draw(this,x:number,y:number): null;
|
||||
undraw(this): null;
|
||||
}
|
||||
|
||||
declare function HeliumLoader(filepath:string):(params:parameters, w:number, h:number)=>HeliumElement;
|
||||
|
||||
export module helium{
|
||||
export let input: typeof import("./core/input") ;
|
||||
export let input: typeof import("./helium/core/input") ;
|
||||
}
|
||||
export function helium<T>(chunk:(params:T,state:state,view:view)=>()=>void):(params:T, w:number, h:number)=>HeliumElement;
|
||||
export function helium<T>(chunk:(params:T,state:state,view:view)=>()=>void):(params:T, w:number, h:number)=>HeliumElement;
|
||||
4
init.lua
4
init.lua
@ -5,7 +5,7 @@
|
||||
----------------------------------------------------]]
|
||||
local path = ...
|
||||
local helium = require(path..".dummy")
|
||||
helium.conf = require(path..".conf")
|
||||
helium.conf = require(path..".local_conf") or require(path..".conf")
|
||||
helium.utils = require(path..".utils")
|
||||
helium.element = require(path..".core.element")
|
||||
helium.input = require(path..".core.input")
|
||||
@ -124,4 +124,6 @@ if helium.conf.AUTO_RUN then
|
||||
end
|
||||
end
|
||||
|
||||
--Typescript
|
||||
helium.helium = helium
|
||||
return helium
|
||||
Loading…
x
Reference in New Issue
Block a user