How to create function which can access and use as type. #3191
Unanswered
jitendraP-ashutec
asked this question in
Q&A
Replies: 2 comments 2 replies
-
Are you trying to expose a method or a method that takes a function as an argument? You'll need to explain more what you're trying to do and wha the problem is. In either case, consulting the TypeScript documentation is likely the best resource: https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#functions |
Beta Was this translation helpful? Give feedback.
1 reply
-
You can just call the method. Example) <my-element id="MyElement"></my-element> const my_element = document.getElementById("MyElement");
my_element.callMyMethod(); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to expose function from element so that user can use that call. How I can set type for that?
Beta Was this translation helpful? Give feedback.
All reactions