Closed tstirrat closed 4 years ago
Good idea. Do you have any idea about the wow classic addon api? its version is currently 1.13.x and is also mostly compatible with the latest api (some functions removed of course).
I think tracking the latest api e.g. 8.2.x is fine, and I wonder if we can mark apis which are not available in classic with some tag that will be visible in vscode... I thought perhaps @deprecated
.. but that might be too heavy handed...
Yes, @deprecated
is not a good solution. Since this repository only provides types for World of Warcraft, i thought about introducing custom decorators.
Option 1:
@availableRetail
and @availableClassic
Option 2:
@noClassic
( or @retailOnly
)Both options will only inform the developer about compatiblity if intellisence is activated within the IDE and if custom decorators are visible in the tooltip (visual studio code does this for example).
Do you have a third option or some completly different idea?
I am also thinking of implementing this decorator in my transpiler to support a selective target (retail or classic). With this feature i am able to tell the user that this function is not supported in classic or retail.
You may also think of something more machine readable :)
Alternatively, inspired by https://github.com/TypeScriptToLua/lua-types, you can serve version specific declarations, sort of like entry points, and pull in whatever is defined in the API for that particular version. For an end-user they would simply refer to @wartoshika/wow-declarations/8.2.0
, @wartoshika/wow-declarations/1.13.2
etc.
Closing this issue since changes have been applied to the repository. Thanks!
This is very much a suggestion/topic for discussion only..
Consider exporting this with the wow api version
i.e.
If we are on WoW api
8.2.0
then versions could be8.2.0.1
,8.2.0.13
, etc