-
Notifications
You must be signed in to change notification settings - Fork 943
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Converted turf-square to Typescript (#2648)
* Converted turf-square to Typescript.
- Loading branch information
1 parent
c9c0a4c
commit 5940110
Showing
7 changed files
with
40 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
import Benchmark from "benchmark"; | ||
import { BBox } from "geojson"; | ||
import Benchmark, { Event } from "benchmark"; | ||
import { square } from "./index.js"; | ||
|
||
var bbox = [0, 0, 5, 10]; | ||
const bbox: BBox = [0, 0, 5, 10]; | ||
|
||
var suite = new Benchmark.Suite("turf-square"); | ||
const suite = new Benchmark.Suite("turf-square"); | ||
suite | ||
.add("turf-square", function () { | ||
square(bbox); | ||
}) | ||
.on("cycle", function (event) { | ||
.on("cycle", function (event: Event) { | ||
console.log(String(event.target)); | ||
}) | ||
.run(); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.