René's URL Explorer Experiment


Title: Extending the API · Issue #8 · ModDota/TypeScriptAddonTemplate · GitHub

Open Graph Title: Extending the API · Issue #8 · ModDota/TypeScriptAddonTemplate

X Title: Extending the API · Issue #8 · ModDota/TypeScriptAddonTemplate

Description: It would be nice to have a file for extending the API. Here is a example for extending CDOTA_BaseNPC: export {} declare global { interface CDOTA_BaseNPC { GetAllAbilities(): CDOTABaseAbility[]; HasTalent(talentName: string): boolean; Get...

Open Graph Description: It would be nice to have a file for extending the API. Here is a example for extending CDOTA_BaseNPC: export {} declare global { interface CDOTA_BaseNPC { GetAllAbilities(): CDOTABaseAbility[]; Has...

X Description: It would be nice to have a file for extending the API. Here is a example for extending CDOTA_BaseNPC: export {} declare global { interface CDOTA_BaseNPC { GetAllAbilities(): CDOTABaseAbility[]; Has...

Opengraph URL: https://github.com/ModDota/TypeScriptAddonTemplate/issues/8

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Extending the API","articleBody":"It would be nice to have a file for extending the API.\r\nHere is a example for extending `CDOTA_BaseNPC`:\r\n```typescript\r\nexport {}\r\ndeclare global {\r\n    interface CDOTA_BaseNPC {\r\n        GetAllAbilities(): CDOTABaseAbility[];\r\n        HasTalent(talentName: string): boolean;\r\n        GetTalent(talentName: string): number;\r\n        HasShard(): boolean,\r\n        GetMissingMana(): number,\r\n        GetAllAbilities(): CDOTABaseAbility[];\r\n        HasTalent(talentName: string): boolean;\r\n        GetTalent(talentName: string): number;\r\n        FindItemByName(itemName: string): CDOTA_Item | undefined;\r\n        RemoveItemByName(itemName: string): void;\r\n        IsRoshan(): boolean;\r\n        HasShard(): boolean;\r\n    }\r\n    interface CScriptParticleManager {\r\n        FireParticle(particleName:string, particleAttach: ParticleAttachment, owner: CBaseEntity|undefined): void;\r\n    }\r\n    interface CDOTA_Buff {\r\n        IsNull(): boolean;\r\n    }\r\n    interface CDOTA_PlayerResource  {\r\n        GetAllPlayers() : CDOTAPlayer[],\r\n    }\r\n\r\n}\r\n\r\nCDOTA_BaseNPC.GetAllAbilities = function() {\r\n    let abilities: CDOTABaseAbility[] = [];\r\n    for (let i=0; i\u003cDOTA_MAX_ABILITIES; i++) {\r\n        let ability = this.GetAbilityByIndex(i);\r\n        if (ability) {\r\n            abilities.push(ability);\r\n        }\r\n    }\r\n    return abilities;\r\n}\r\nCDOTA_BaseNPC.HasTalent = function (talentName: string) {\r\n    let talent = this.FindAbilityByName(talentName)\r\n    return talent ? talent.GetLevel()\u003e0 : false;\r\n}\r\nCDOTA_BaseNPC.GetTalent = function (talentName: string) {\r\n    let talent = this.FindAbilityByName(talentName);\r\n    return talent ? talent.GetSpecialValueFor(\"value\") : 0;\r\n}\r\nCDOTA_BaseNPC.HasShard = function() {\r\n    return this.HasModifier(\"modifier_item_aghanims_shard\");\r\n}\r\nCDOTA_BaseNPC.GetMissingMana = function() {\r\n    return this.GetMaxMana() - this.GetMana();\r\n}\r\nCDOTA_BaseNPC.FindItemByName = function(itemName: string) {\r\n    for (let slot=0; slot\u003c=16; slot++) {\r\n        const item = this.GetItemInSlot(slot);\r\n        if (item) return item;\r\n    }\r\n    return undefined;\r\n}\r\nCDOTA_BaseNPC.RemoveItemByName = function(itemName: string) {\r\n    const item = this.FindItemByName(itemName);\r\n    if (item) this.RemoveItem(item);\r\n}\r\nCDOTA_BaseNPC.IsRoshan = function() {\r\n    return this.GetName() == \"npc_dota_roshan\";\r\n}\r\nCScriptParticleManager.FireParticle = function(particleName: string, particleAttach: ParticleAttachment, owner: CBaseEntity | undefined) {\r\n    let particle = ParticleManager.CreateParticle(particleName, particleAttach, owner);\r\n    ParticleManager.ReleaseParticleIndex(particle);\r\n}\r\nCDOTA_PlayerResource.GetAllPlayers = function() {\r\n    const players = new Array\u003cCDOTAPlayer\u003e();\r\n    for (let i=0; i\u003cDOTA_MAX_PLAYERS; i++) {\r\n        if (PlayerResource.IsValidPlayer(i)) {\r\n            const player = PlayerResource.GetPlayer(i);\r\n            if (player) players.push();\r\n        }\r\n    }\r\n    return players;\r\n}\r\n```\r\n\r\nP.S.: I import the `extended_api`-file in the `GameMode.ts`-file. (`import \"./utils/extended_api\";`)","author":{"url":"https://github.com/GniLudio","@type":"Person","name":"GniLudio"},"datePublished":"2021-11-24T15:39:13.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/8/TypeScriptAddonTemplate/issues/8"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:aebebbc8-a28e-9337-e6ae-259729329e31
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC29A:3AB83:12090B9:17AC11E:698D7C68
html-safe-noncef3ad8a01f0e867f8d99eb09f08963b9e210b73ee87a5d9829cc98e07757b91d9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjlBOjNBQjgzOjEyMDkwQjk6MTdBQzExRTo2OThEN0M2OCIsInZpc2l0b3JfaWQiOiIyODU0MDM1ODk0ODYzNDk0MjQ4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacc4d3d9a6e875063ff147c92066cad4594151ac180a679b92a173338857955c54
hovercard-subject-tagissue:1062578109
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/ModDota/TypeScriptAddonTemplate/8/issue_layout
twitter:imagehttps://opengraph.githubassets.com/77e58721a3bfe8712b20bce64b5f7f23b4689128e7eab92bb72291cef5dc32f3/ModDota/TypeScriptAddonTemplate/issues/8
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/77e58721a3bfe8712b20bce64b5f7f23b4689128e7eab92bb72291cef5dc32f3/ModDota/TypeScriptAddonTemplate/issues/8
og:image:altIt would be nice to have a file for extending the API. Here is a example for extending CDOTA_BaseNPC: export {} declare global { interface CDOTA_BaseNPC { GetAllAbilities(): CDOTABaseAbility[]; Has...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameGniLudio
hostnamegithub.com
expected-hostnamegithub.com
Nonec0818105fa276287e9369cfdefa0a0fa7953719791ceff9b94d69623c0a4fe8a
turbo-cache-controlno-preview
go-importgithub.com/ModDota/TypeScriptAddonTemplate git https://github.com/ModDota/TypeScriptAddonTemplate.git
octolytics-dimension-user_id10570389
octolytics-dimension-user_loginModDota
octolytics-dimension-repository_id231253304
octolytics-dimension-repository_nwoModDota/TypeScriptAddonTemplate
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id231253304
octolytics-dimension-repository_network_root_nwoModDota/TypeScriptAddonTemplate
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release715890fa442134f528fb422ab338c0ad55c7a025
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/ModDota/TypeScriptAddonTemplate/issues/8#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FModDota%2FTypeScriptAddonTemplate%2Fissues%2F8
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FModDota%2FTypeScriptAddonTemplate%2Fissues%2F8
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=ModDota%2FTypeScriptAddonTemplate
Reloadhttps://patch-diff.githubusercontent.com/ModDota/TypeScriptAddonTemplate/issues/8
Reloadhttps://patch-diff.githubusercontent.com/ModDota/TypeScriptAddonTemplate/issues/8
Reloadhttps://patch-diff.githubusercontent.com/ModDota/TypeScriptAddonTemplate/issues/8
ModDota https://patch-diff.githubusercontent.com/ModDota
TypeScriptAddonTemplatehttps://patch-diff.githubusercontent.com/ModDota/TypeScriptAddonTemplate
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2FModDota%2FTypeScriptAddonTemplate
Fork 26 https://patch-diff.githubusercontent.com/login?return_to=%2FModDota%2FTypeScriptAddonTemplate
Star 92 https://patch-diff.githubusercontent.com/login?return_to=%2FModDota%2FTypeScriptAddonTemplate
Code https://patch-diff.githubusercontent.com/ModDota/TypeScriptAddonTemplate
Issues 3 https://patch-diff.githubusercontent.com/ModDota/TypeScriptAddonTemplate/issues
Pull requests 1 https://patch-diff.githubusercontent.com/ModDota/TypeScriptAddonTemplate/pulls
Actions https://patch-diff.githubusercontent.com/ModDota/TypeScriptAddonTemplate/actions
Projects 0 https://patch-diff.githubusercontent.com/ModDota/TypeScriptAddonTemplate/projects
Security 0 https://patch-diff.githubusercontent.com/ModDota/TypeScriptAddonTemplate/security
Insights https://patch-diff.githubusercontent.com/ModDota/TypeScriptAddonTemplate/pulse
Code https://patch-diff.githubusercontent.com/ModDota/TypeScriptAddonTemplate
Issues https://patch-diff.githubusercontent.com/ModDota/TypeScriptAddonTemplate/issues
Pull requests https://patch-diff.githubusercontent.com/ModDota/TypeScriptAddonTemplate/pulls
Actions https://patch-diff.githubusercontent.com/ModDota/TypeScriptAddonTemplate/actions
Projects https://patch-diff.githubusercontent.com/ModDota/TypeScriptAddonTemplate/projects
Security https://patch-diff.githubusercontent.com/ModDota/TypeScriptAddonTemplate/security
Insights https://patch-diff.githubusercontent.com/ModDota/TypeScriptAddonTemplate/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/ModDota/TypeScriptAddonTemplate/issues/8
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/ModDota/TypeScriptAddonTemplate/issues/8
Extending the APIhttps://patch-diff.githubusercontent.com/ModDota/TypeScriptAddonTemplate/issues/8#top
https://github.com/GniLudio
https://github.com/GniLudio
GniLudiohttps://github.com/GniLudio
on Nov 24, 2021https://github.com/ModDota/TypeScriptAddonTemplate/issues/8#issue-1062578109
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.