Skip to content
This repository was archived by the owner on Oct 21, 2021. It is now read-only.

Commit de41290

Browse files
committed
Tidy copy
1 parent 5333cba commit de41290

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

README.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ for (const input of inputs) {
4141
// Retrieve the attribute's value or throw.
4242
const url: string = getAttribute(image, 'data-url')
4343

44-
4544
// Find the form's `input[name=login]` field or throw if not found.
4645
const form: HTMLFormElement = query(document, 'form', HTMLFormElement)
4746
const input: HTMLInputElement = namedItem(form, 'login')
@@ -91,20 +90,15 @@ if (el instanceof HTMLInputElement) {
9190

9291
Because `document.querySelector` is so frequently used in web applications,
9392
and it's tedious to guard every element query with null checks, these tests
94-
are most often omitted.
95-
96-
When using [Flow][], however, these tests become required to pass the
97-
type checker.
93+
are most often omitted. When using [Flow][], however, these tests become
94+
required to pass the type checker.
9895

9996
[Flow]: https://flow.org
10097

10198
The combination of null tests and subclass type refinements feels like we're
102-
working against the type system, rather than with it, which is the motivation
103-
for this library.
104-
105-
These typed query functions consider a missing element, or an element of the
106-
wrong type, to be failed assertions and throw an exception to fail as early
107-
as possible.
99+
working against the type system, rather than with it. So, typed query functions
100+
consider a missing element, or an element of the wrong type, to be failed
101+
assertions and throw an exception to fail as early as possible.
108102

109103
## Development
110104

0 commit comments

Comments
 (0)