Skip to content

Commit

Permalink
docs(README): explain type guards
Browse files Browse the repository at this point in the history
  • Loading branch information
jpoehnelt committed Nov 9, 2021
1 parent 7aa345e commit 68cda73
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

This package provides [TypeScript guards](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) for the Google Maps JavaScript API.

A type guard (or type predicate) is an expression that performs a runtime check that guarantees the type in some scope. Type guards are used to narrow the type of a variable or parameter.

## Documentation

For the complete API check the [reference documentation](https://googlemaps.github.io/js-typescript-guards/index.html).
Expand Down Expand Up @@ -40,4 +42,4 @@ if (isLatLngLiteral(latLng)) {
lat = latLng.lat();
lng = latLng.lng();
}
```
```

0 comments on commit 68cda73

Please sign in to comment.