You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I will try to fix all of them and do a pull request.
The text was updated successfully, but these errors were encountered:
valerian
changed the title
Many issues with argument types declared as 1-tuples instead of arrays
Many argument are 1-tuples where they should be arrays
Jul 6, 2016
valerian
changed the title
Many argument are 1-tuples where they should be arrays
Many types are 1-tuples where they should be arrays
Jul 6, 2016
Throughout the declarations there are many occurrences of 1-tuples where it should have been an array.
[string]
is a 1-tuple containing 1 element of type string.string[]
is an array of string elements.And what is even more confusing is that tuples are bugged in TypeScript, allowing to use more elements than defined: microsoft/TypeScript#6229
An example of this issue in the present declarations:
RoomPosition.findClosestByRange<T>(objects: [T|RoomPosition], opts?: {filter: any|string }): T;
Which should actually be:
RoomPosition.findClosestByRange<T>(objects: T[]|RoomPosition[], opts?: {filter: any|string }): T;
I will try to fix all of them and do a pull request.
The text was updated successfully, but these errors were encountered: