-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated tsconfig to output jsdoc and updated tests
- Loading branch information
Showing
17 changed files
with
1,686 additions
and
1,391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,5 @@ node_modules/ | |
lib/ | ||
dist/ | ||
.env | ||
|
||
typings/ | ||
*.tsbuildinfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import { hasFieldOfType, hasMessageField } from "../src/sysutils"; | ||
|
||
const obj1 = { | ||
message: "hello world" | ||
} | ||
|
||
console.log(hasMessageField(obj1)); | ||
console.log(hasFieldOfType<string>(obj1, "message", "string")); | ||
|
||
const obj2 = { | ||
message: 1 | ||
} | ||
console.log(hasMessageField(obj2)); | ||
console.log(hasFieldOfType(obj2, "message", "number")); | ||
console.log(hasFieldOfType(obj2, "message", "string")); | ||
import { hasFieldOfType, hasMessageField } from "../src/sysutils"; | ||
|
||
const obj1 = { | ||
message: "hello world" | ||
} | ||
|
||
console.log("obj1 has a field message of string type: ", hasMessageField(obj1)); | ||
console.log("obj1 has a field message of string type: ", hasFieldOfType<string>(obj1, "message", "string")); | ||
|
||
const obj2 = { | ||
message: 1 | ||
} | ||
console.log(hasMessageField(obj2)); | ||
console.log("obj2 has a field message of number type: ", hasFieldOfType(obj2, "message", "number")); | ||
console.log("obj2 has a field message of string type: ", hasFieldOfType(obj2, "message", "string")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.