Skip to content

Instantly share code, notes, and snippets.

@redradist
Created September 12, 2021 12:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save redradist/8a104ff432b31aa06851abf6ea50e4bb to your computer and use it in GitHub Desktop.
Save redradist/8a104ff432b31aa06851abf6ea50e4bb to your computer and use it in GitHub Desktop.
TypeScript any and number
// network_api.ts
class HttpPythonSiteObject {
...
}
function get_url_object(url: string): any {
...
return new HttpPythonSiteObject();
}
// main.ts
...
let python_obj = get_url_object("https://www.python.org");
python_obj += 1; // What it the result ?? What it actually means to combine site object with number ??
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment