Skip to content

Commit

Permalink
feat(JawgPlaces): add destroy function, it will clear created DOM e…
Browse files Browse the repository at this point in the history
…lements and listeners
  • Loading branch information
Joxit committed Feb 22, 2022
1 parent ad12506 commit 4b64ecb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jawg/types",
"version": "1.0.3",
"version": "1.0.4",
"description": "Shared TypeScript definitions for Jawg Maps projects",
"types": "./index.d.ts",
"typeScriptVersion": "2.3",
Expand Down
5 changes: 5 additions & 0 deletions src/places-js.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ declare class AbstractPlaces {
* Close the result list.
*/
close(): void;
/**
* Clear created DOM elements and listeners.
* This could be usefull when you recreate a JawgPlace object for the same input.
*/
destroy(): void;
}

declare namespace JawgPlaces {
Expand Down

0 comments on commit 4b64ecb

Please sign in to comment.