I am currently working on a code that is in c# and utilizes a web browser. My goal is to convert the existing JavaScript code to Angular 7 and Typescript.
Below is the c# code and the corresponding JavaScript code used to access the c# function from JavaScript:
In c#:
public int CheckLogin(object phone, object password)
In JavaScript:
window.external.CheckLogin(number,password)
Initially, it was simple to call the CheckLogin function from JavaScript using window.external.[method]. However, when trying to use window.external.CheckLogin in Typescript, I encountered the error message:
"Property 'CheckLogin' does not exist on type 'External'"
How can I access the c# function from a web browser using Angular 7 or Typescript?