Skip to content

Releases: bobkorinek/mapy-api-ts-types

Fixed problems with inheritance

07 Dec 19:02
Compare
Choose a tag to compare

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 with void as return type now has object return type
  • Methods getCopyright have been duplicated for classes with problematic class inheritance and fixed theirs types.
  • Class SMap.Route now has defined methods from JAK.ISignals
  • Interface SMap.IOwned now accepts owners based on the new created generic type.
  • Constructor's second argument conf of class SMap.Control.Scale has been renamed to conf2 due to duplicate argument name.
  • Constructor's last argument config of class SMap.Projection.Oblique has been renamed to config2 due to duplicate argument name.

Small bug fixes

12 May 16:56
Compare
Choose a tag to compare

This is minor release, that addresses few small, but really annoying bugs.

Changes

Temporary fix for type issues

12 Apr 12:11
Compare
Choose a tag to compare

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

11 Apr 21:01
Compare
Choose a tag to compare

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

06 Apr 06:16
Compare
Choose a tag to compare

First types added (classes, methods and properties) describing interfaces of Mapy API library.