Skip to content

Commit 3e1d51c

Browse files
committed
Update documentation in README
1 parent e03e92e commit 3e1d51c

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

README.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -694,14 +694,15 @@ interface Metric {
694694
entries: (PerformanceEntry | LayoutShift | FirstInputPolyfillEntry | NavigationTimingPolyfillEntry)[];
695695

696696
/**
697-
* The type of navigation
697+
* The type of navigation.
698698
*
699-
* Navigation Timing API (or `undefined` if the browser doesn't
700-
* support that API).
701-
* For pages that are restored from the bfcache, this value will
702-
* be 'back-forward-cache'.
703-
* For pages that are restored after being discarded, this value will
704-
* be 'restore'.
699+
* This will be the value returned by the Navigation Timing API (or
700+
* `undefined` if the browser doesn't support that API), with the following
701+
* exceptions:
702+
* - 'back-forward-cache': for pages that are restored from the bfcache.
703+
* - 'prerender': for pages that were prerendered.
704+
* - 'restore': for pages that were discarded by the browser and then
705+
* restored by the user.
705706
*/
706707
navigationType: 'navigate' | 'reload' | 'back-forward' | 'back-forward-cache' | 'prerender' | 'restore';
707708
}

src/types/base.ts

+8-4
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,15 @@ export interface Metric {
5959
entries: (PerformanceEntry | LayoutShift | FirstInputPolyfillEntry | NavigationTimingPolyfillEntry)[];
6060

6161
/**
62-
* The type of navigation
62+
* The type of navigation.
6363
*
64-
* Navigation Timing API (or `undefined` if the browser doesn't
65-
* support that API). For pages that are restored from the bfcache, this
66-
* value will be 'back-forward-cache'.
64+
* This will be the value returned by the Navigation Timing API (or
65+
* `undefined` if the browser doesn't support that API), with the following
66+
* exceptions:
67+
* - 'back-forward-cache': for pages that are restored from the bfcache.
68+
* - 'prerender': for pages that were prerendered.
69+
* - 'restore': for pages that were discarded by the browser and then
70+
* restored by the user.
6771
*/
6872
navigationType: 'navigate' | 'reload' | 'back-forward' | 'back-forward-cache' | 'prerender' | 'restore';
6973
}

0 commit comments

Comments
 (0)