Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TILES-4804 Added RulerData type test. Bumped verison (v2.0.6) #25

Merged
merged 4 commits into from
Dec 1, 2022

Conversation

Farfurix
Copy link
Contributor

No description provided.

@Trufi
Copy link

Trufi commented Nov 30, 2022

А может вообще этот тип удалить? Он кажется полностью бесполезным

@Farfurix Farfurix requested a review from aldoha November 30, 2022 09:59
@Farfurix Farfurix marked this pull request as ready for review November 30, 2022 09:59
@Farfurix
Copy link
Contributor Author

@Trufi

То есть упростить до следующего вида?

- export interface BaseData {
-     type: RulerMode;
- }

- export interface PolygonData extends BaseData {
+ export interface PolygonData {
      type: 'polygon';
      coordinates: GeoPoint[][];
      lengths: number[];
      perimeter: number;
      area: number;
  }

- export interface PolylineData extends BaseData {
+ export interface PolylineData {
      type: 'polyline';
      coordinates: GeoPoint[];
      lengths: number[];
      length: number;
  }

Но тогда конкретные реализации (PolygonData и PolylineData) в type: 'polygon' | 'polyline' потеряют связь с RulerMode. Этот базовый интерфейс (BaseData) выглядит нормально.

@myshov myshov requested review from itanka9 and myshov December 1, 2022 08:58
@Trufi
Copy link

Trufi commented Dec 1, 2022

Ok, удалять BaseData не надо

@Farfurix Farfurix changed the title TILES-4804 Added RulerData type test TILES-4804 Added RulerData type test. Bumped verison (v2.0.6) Dec 1, 2022
@Farfurix Farfurix merged commit e0d95f1 into master Dec 1, 2022
@Farfurix Farfurix deleted the TILES-4804 branch December 1, 2022 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants