Skip to content

Commit 6458c75

Browse files
committed
x should be an Object
x should be an Object to use *isAcceptable* method
1 parent ec4e21d commit 6458c75

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pages/Modules.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ import { ZipCodeValidator as Zip } from "./ZipCodeValidator";
423423

424424
if (needZipValidation) {
425425
var x: typeof Zip = require("./ZipCodeValidator");
426-
if (x.isAcceptable(".....")) { /* ... */ }
426+
if (new x.isAcceptable(".....")) { /* ... */ }
427427
}
428428
```
429429

@@ -436,7 +436,7 @@ import { ZipCodeValidator as Zip } from "./ZipCodeValidator";
436436

437437
if (needZipValidation) {
438438
require(["./ZipCodeValidator"], (x: typeof Zip) => {
439-
if (x.isAcceptable("...")) { /* ... */ }
439+
if (new x.isAcceptable("...")) { /* ... */ }
440440
});
441441
}
442442
```
@@ -450,7 +450,7 @@ import { ZipCodeValidator as Zip } from "./ZipCodeValidator";
450450

451451
if (needZipValidation) {
452452
System.import("./ZipCodeValidator").then((x: typeof Zip) => {
453-
if (x.isAcceptable("...")) { /* ... */ }
453+
if (new x.isAcceptable("...")) { /* ... */ }
454454
});
455455
}
456456
```

0 commit comments

Comments
 (0)