Releases: bobkorinek/mapy-api-ts-types
Fixed problems with inheritance
This version addresses problems with invalid inheritance types. Many of the classes have invalid type for theirs method from parent's class, which results in TypeScript errors. Some of the methods have been fixed without any problem, but many of the methods are redefined with completely different number of arguments. This had to be fixed with duplicating the method into multiple versions. For example method getCopyright
doesn't accept any argument, but some classes redefine this method and add a zoom
argument. For this reason, these classes have this method defined twice: once for the method with argument a second without the argument. This might cause a little chaos, but it was the only workaround for this type of problem.
Changes
- Methods
getContainer
withvoid
as return type now hasobject
return type - Methods
getCopyright
have been duplicated for classes with problematic class inheritance and fixed theirs types. - Class
SMap.Route
now has defined methods fromJAK.ISignals
- Interface
SMap.IOwned
now accepts owners based on the new created generic type. - Constructor's second argument
conf
of classSMap.Control.Scale
has been renamed toconf2
due to duplicate argument name. - Constructor's last argument
config
of classSMap.Projection.Oblique
has been renamed toconfig2
due to duplicate argument name.
Small bug fixes
This is minor release, that addresses few small, but really annoying bugs.
Changes
Temporary fix for type issues
The @ts-nocheck
tag has been temporally added to index.d.ts
file due to many unresolved type problems in documentation (TypeScript compiler might not accept the index.d.ts
file, because it contains few type issues). This fix should be temporary. After resolving the type issues, this tag is going to be removed.
Comment update
In the previous version of library, comments were created only from short text description that you could find in Mapy API documentation for almost every method. In this version, you can find, that all methods and classes were enhanced with JSDoc comments to improve readability of the types.
Supported JSDoc tags
@param
- every argument in method now has its own description (+comment if provided)@see
- classes, methods and properties now has its own link to documentation@returns
- description of return values of methods (+comment if provided)@fires
- describes event, which is fired by the class
Additional changes
- Interfaces support
- Some classes are now parsed as interfaces (SMap.IOwned).
- Classes can implement interfaces.
- All comments should now be valid sentences (i. e. start with uppercase letter and end with ending sign).
- Descriptions added for properties.
Basic types for Mapy API
First types added (classes, methods and properties) describing interfaces of Mapy API library.