René's URL Explorer Experiment


Title: Definition changes in types · Issue #7 · ModDota/TypeScriptDeclarations · GitHub

Open Graph Title: Definition changes in types · Issue #7 · ModDota/TypeScriptDeclarations

X Title: Definition changes in types · Issue #7 · ModDota/TypeScriptDeclarations

Description: Due to how the engine works in Dota, some type definitions need to include "undefined" or "void" as an exit option. This occurs when the result is not something that you want to change, but rather, tell the engine to change nothing. It o...

Open Graph Description: Due to how the engine works in Dota, some type definitions need to include "undefined" or "void" as an exit option. This occurs when the result is not something that you want to change, but rather,...

X Description: Due to how the engine works in Dota, some type definitions need to include "undefined" or "void" as an exit option. This occurs when the result is not something that you want to...

Opengraph URL: https://github.com/ModDota/TypeScriptDeclarations/issues/7

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Definition changes in types","articleBody":"Due to how the engine works in Dota, some type definitions need to include \"undefined\" or \"void\" as an exit option. This occurs when the result is not something that you want to change, but rather, tell the engine to change nothing. It occurs mainly on conditional changes, such as client/server checks, or conditional occurrences. I'll detail the following functions with an example.\r\n\r\n**CastFilterResultTarget**: should be changed from \"UnitFilterResult\" to \"UnitFilterResult | undefined\".\r\nExample: Checking for a nearby allied unit in radius, which can only be done by the server. In this case, we must do `if (!IsServer()) return;` to exit from the client. The filter works regardless of the client's definition.\r\nExample:\r\n```ts\r\nCastFilterResultTarget(target: CDOTA_BaseNPC): UnitFilterResult | undefined\r\n    {\r\n        if (!IsServer()) return;\r\n\r\n        // Always apply on enemies according to the unit filter\r\n        if (target.GetTeamNumber() != this.caster.GetTeamNumber())\r\n        {\r\n            return UnitFilter(target, this.GetAbilityTargetTeam(), this.GetAbilityTargetType(), this.GetAbilityTargetFlags(), this.caster.GetTeamNumber());\r\n        }\r\n        else // Check on allies for disable help\r\n        {\r\n            if (PlayerResource.IsDisableHelpSetForPlayerID(target.GetPlayerOwnerID(), this.caster.GetPlayerOwnerID()))\r\n            {\r\n                return UnitFilterResult.FAIL_DISABLE_HELP;\r\n            }            \r\n\r\n            return UnitFilter(target, this.GetAbilityTargetTeam(), this.GetAbilityTargetType(), this.GetAbilityTargetFlags(), this.caster.GetTeamNumber());            \r\n        }\r\n    }\r\n```\r\n\r\n**ParticleManager.SetParticleControlEnt's attachment argument:** should be changed from \"string\" to \"string | undefined\". This is due to some particles requiring the usage of SetParticleControlEnt, but the attachment is ABSORIGIN_FOLLOW, which has no attachment.\r\nExample: Sven's God's Strength CP1 will only work with SetParticleControlEnt (for some weird reason...), but is set on the origin. It is used correctly in this form:\r\n```ts\r\nParticleManager.SetParticleControlEnt(this.particle_cast_fx, 1, this.caster, ParticleAttachment.ABSORIGIN_FOLLOW, undefined, this.caster.GetAbsOrigin(), true)\r\n```\r\n\r\n**CheckState()**: should be changed from \"Partial\u003cRecord\u003cModifierState, boolean\u003e\u003e\" to \"Partial\u003cRecord\u003cModifierState, boolean\u003e\u003e | undefined\". This is to allow cases where you no longer want to define any state. Returning true or false applies the effect on you (e.g. Invisibility, stunned) based on the priority of other modifier, which may ignore them. Instead, not returning anything (or returning undefined) lets the engine simply ignore this state.\r\nExample: \r\n```ts\r\nCheckState(): Partial\u003cRecord\u003cModifierState, boolean\u003e\u003e | undefined\r\n    {\r\n        if (this.proc_attack)\r\n        {\r\n            return {[ModifierState.CANNOT_MISS]: true}\r\n        }\r\n    }\r\n```\r\n\r\n**GetActivityTranslationModifiers()**: Should be changed from \"string\" to \"string | void\". This is due to the fact that sometimes you do not want any translation modifiers to be applied at all.\r\nExample: Night Stalker only applies the \"hunter_night\" translation at night, otherwise applies no translation:\r\n```ts\r\nGetActivityTranslationModifiers(): string | void\r\n    {\r\n        if (this.ShouldModifierBeActive())\r\n        {\r\n            return \"hunter_night\";\r\n        }\r\n        \r\n        return;\r\n    }\r\n```\r\n\r\n**GetModifierPreAttack_CriticalStrike()**: Should be changed from \"number\" to \"number | void\". Returning 0 still causes heroes that have critical strike animations (such as Phantom Assassin, Wraith King, Juggernaut) to proc those, which makes no sense if they're not actually proccing crits. Simply returning resolves this.\r\nExample:\r\n```ts\r\nGetModifierPreAttack_CriticalStrike(event: ModifierAttackEvent): number | void\r\n    {\r\n        // Does not apply on allies, buildings or wards\r\n        if (event.target.GetTeamNumber() == this.parent.GetTeamNumber() || event.target.IsBuilding() || event.target.IsOther()) return;\r\n\r\n     // some more irrelevant crit calculation logic....\r\n    }\r\n```\r\n","author":{"url":"https://github.com/JoyfulShush","@type":"Person","name":"JoyfulShush"},"datePublished":"2020-11-08T10:25:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/7/TypeScriptDeclarations/issues/7"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c99c6caa-d927-8c7a-3705-94b3124fc3fb
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE510:23BCE:17903A:1E370E:698E623E
html-safe-nonce2c73f61f90a40fb22d74432badcaeeff0d9d29998bc4d1b9a122f145750f14c0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTEwOjIzQkNFOjE3OTAzQToxRTM3MEU6Njk4RTYyM0UiLCJ2aXNpdG9yX2lkIjoiNzMzMzUzMzYyNDgxNjM1OTAyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac4556ead5f08c2def77a9f53752a055356c467015f9b4f3391f320e660a34886b
hovercard-subject-tagissue:738435375
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/TypeScriptDeclarations/7/issue_layout
twitter:imagehttps://opengraph.githubassets.com/1a61cde69e124b696df2e22fa884acf0cb7e4477967f0618d5b80b99d9c87be2/ModDota/TypeScriptDeclarations/issues/7
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1a61cde69e124b696df2e22fa884acf0cb7e4477967f0618d5b80b99d9c87be2/ModDota/TypeScriptDeclarations/issues/7
og:image:altDue to how the engine works in Dota, some type definitions need to include "undefined" or "void" as an exit option. This occurs when the result is not something that you want to change, but rather,...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameJoyfulShush
hostnamegithub.com
expected-hostnamegithub.com
None666e30cc1de8ebdf458084bf731e95deba4f074a5008f91b50803aa9a71e3725
turbo-cache-controlno-preview
go-importgithub.com/ModDota/TypeScriptDeclarations git https://github.com/ModDota/TypeScriptDeclarations.git
octolytics-dimension-user_id10570389
octolytics-dimension-user_loginModDota
octolytics-dimension-repository_id234397978
octolytics-dimension-repository_nwoModDota/TypeScriptDeclarations
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id234397978
octolytics-dimension-repository_network_root_nwoModDota/TypeScriptDeclarations
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
releasef2d67bd549813f8aceb31f205ebdb434e9d46d38
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/ModDota/TypeScriptDeclarations/issues/7#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FModDota%2FTypeScriptDeclarations%2Fissues%2F7
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%2FTypeScriptDeclarations%2Fissues%2F7
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%2FTypeScriptDeclarations
Reloadhttps://patch-diff.githubusercontent.com/ModDota/TypeScriptDeclarations/issues/7
Reloadhttps://patch-diff.githubusercontent.com/ModDota/TypeScriptDeclarations/issues/7
Reloadhttps://patch-diff.githubusercontent.com/ModDota/TypeScriptDeclarations/issues/7
ModDota https://patch-diff.githubusercontent.com/ModDota
TypeScriptDeclarationshttps://patch-diff.githubusercontent.com/ModDota/TypeScriptDeclarations
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2FModDota%2FTypeScriptDeclarations
Fork 15 https://patch-diff.githubusercontent.com/login?return_to=%2FModDota%2FTypeScriptDeclarations
Star 19 https://patch-diff.githubusercontent.com/login?return_to=%2FModDota%2FTypeScriptDeclarations
Code https://patch-diff.githubusercontent.com/ModDota/TypeScriptDeclarations
Issues 1 https://patch-diff.githubusercontent.com/ModDota/TypeScriptDeclarations/issues
Pull requests 0 https://patch-diff.githubusercontent.com/ModDota/TypeScriptDeclarations/pulls
Actions https://patch-diff.githubusercontent.com/ModDota/TypeScriptDeclarations/actions
Projects 0 https://patch-diff.githubusercontent.com/ModDota/TypeScriptDeclarations/projects
Security 0 https://patch-diff.githubusercontent.com/ModDota/TypeScriptDeclarations/security
Insights https://patch-diff.githubusercontent.com/ModDota/TypeScriptDeclarations/pulse
Code https://patch-diff.githubusercontent.com/ModDota/TypeScriptDeclarations
Issues https://patch-diff.githubusercontent.com/ModDota/TypeScriptDeclarations/issues
Pull requests https://patch-diff.githubusercontent.com/ModDota/TypeScriptDeclarations/pulls
Actions https://patch-diff.githubusercontent.com/ModDota/TypeScriptDeclarations/actions
Projects https://patch-diff.githubusercontent.com/ModDota/TypeScriptDeclarations/projects
Security https://patch-diff.githubusercontent.com/ModDota/TypeScriptDeclarations/security
Insights https://patch-diff.githubusercontent.com/ModDota/TypeScriptDeclarations/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/ModDota/TypeScriptDeclarations/issues/7
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/ModDota/TypeScriptDeclarations/issues/7
Definition changes in typeshttps://patch-diff.githubusercontent.com/ModDota/TypeScriptDeclarations/issues/7#top
https://github.com/JoyfulShush
https://github.com/JoyfulShush
JoyfulShushhttps://github.com/JoyfulShush
on Nov 8, 2020https://github.com/ModDota/TypeScriptDeclarations/issues/7#issue-738435375
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.