Skip to content

Commit 324e2f0

Browse files
committed
Finish EPC intro
1 parent d7b5295 commit 324e2f0

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

examples/excess-property-checking.ts

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
// Excess Property Checking (abbreviated to EPC from here) is a series of checks which
1+
// Excess Property Checking (abbreviated to EPC from here) is a system which detects
2+
// when extra properties are added to objects when it's likely a mistake, while still
3+
// allowing most object to contain extra properties for flexibility.
4+
5+
// At its best, this allows you to reuse the same function with very different inputs,
6+
// as you define only the subset of data you need from an object. Most functions don't
7+
// have a problem accepting additional properties on objects.
8+
9+
// At its worst, this is confusing or even unsafe at runtime.
10+
11+
// Knowing how this works is very important.
212

313
// All types are "open" or "inexact" in TypeScript. There currently are no
414
// "closed" or "exact" types.

0 commit comments

Comments
 (0)