Skip to content

Commit 837a012

Browse files
committed
Initial port of CoreUtils, ErrorType, PagedResult, Result, ResultError, CollectionUtils, PromiseFactory
1 parent 8ee629b commit 837a012

27 files changed

Lines changed: 4103 additions & 11 deletions

docs/README.md

Lines changed: 453 additions & 9 deletions
Large diffs are not rendered by default.

docs/classes/resulterrorrecord.md

Lines changed: 902 additions & 0 deletions
Large diffs are not rendered by default.

docs/classes/resultrecord.md

Lines changed: 1021 additions & 0 deletions
Large diffs are not rendered by default.

docs/enums/errortype.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[andculturecode-javascript-core](../README.md)[ErrorType](errortype.md)
2+
3+
# Enumeration: ErrorType
4+
5+
## Index
6+
7+
### Enumeration members
8+
9+
* [Error](errortype.md#error)
10+
* [ValidationError](errortype.md#validationerror)
11+
12+
## Enumeration members
13+
14+
### Error
15+
16+
**Error**: = 0
17+
18+
Defined in src/enumerations/error-type.ts:2
19+
20+
___
21+
22+
### ValidationError
23+
24+
**ValidationError**: = 1
25+
26+
Defined in src/enumerations/error-type.ts:3

docs/interfaces/pagedresult.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
[andculturecode-javascript-core](../README.md)[PagedResult](pagedresult.md)
2+
3+
# Interface: PagedResult <**T**>
4+
5+
## Type parameters
6+
7+
**T**
8+
9+
## Hierarchy
10+
11+
* **PagedResult**
12+
13+
## Index
14+
15+
### Properties
16+
17+
* [errors](pagedresult.md#optional-errors)
18+
* [resultObject](pagedresult.md#optional-resultobject)
19+
* [rowCount](pagedresult.md#rowcount)
20+
21+
## Properties
22+
23+
### `Optional` errors
24+
25+
**errors**? : *[ResultErrorRecord](../classes/resulterrorrecord.md)[]*
26+
27+
Defined in src/interfaces/paged-result.ts:8
28+
29+
___
30+
31+
### `Optional` resultObject
32+
33+
**resultObject**? : *T[]*
34+
35+
Defined in src/interfaces/paged-result.ts:9
36+
37+
___
38+
39+
### rowCount
40+
41+
**rowCount**: *number*
42+
43+
Defined in src/interfaces/paged-result.ts:10

docs/interfaces/result.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[andculturecode-javascript-core](../README.md)[Result](result.md)
2+
3+
# Interface: Result <**T**>
4+
5+
## Type parameters
6+
7+
**T**
8+
9+
## Hierarchy
10+
11+
* **Result**
12+
13+
## Implemented by
14+
15+
* [ResultRecord](../classes/resultrecord.md)
16+
17+
## Index
18+
19+
### Properties
20+
21+
* [errors](result.md#optional-errors)
22+
* [resultObject](result.md#optional-resultobject)
23+
24+
## Properties
25+
26+
### `Optional` errors
27+
28+
**errors**? : *[ResultErrorRecord](../classes/resulterrorrecord.md)[]*
29+
30+
Defined in src/interfaces/result.ts:8
31+
32+
___
33+
34+
### `Optional` resultObject
35+
36+
**resultObject**? : *T*
37+
38+
Defined in src/interfaces/result.ts:9

docs/interfaces/resulterror.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
[andculturecode-javascript-core](../README.md)[ResultError](resulterror.md)
2+
3+
# Interface: ResultError
4+
5+
## Hierarchy
6+
7+
* **ResultError**
8+
9+
## Implemented by
10+
11+
* [ResultErrorRecord](../classes/resulterrorrecord.md)
12+
13+
## Index
14+
15+
### Properties
16+
17+
* [key](resulterror.md#optional-key)
18+
* [message](resulterror.md#optional-message)
19+
* [type](resulterror.md#optional-type)
20+
21+
## Properties
22+
23+
### `Optional` key
24+
25+
**key**? : *undefined | string*
26+
27+
Defined in src/interfaces/result-error.ts:8
28+
29+
___
30+
31+
### `Optional` message
32+
33+
**message**? : *undefined | string*
34+
35+
Defined in src/interfaces/result-error.ts:9
36+
37+
___
38+
39+
### `Optional` type
40+
41+
**type**? : *[ErrorType](../enums/errortype.md)*
42+
43+
Defined in src/interfaces/result-error.ts:10

jest.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
globals: {
3+
"ts-jest": {
4+
diagnostics: false,
5+
tsConfig: "<rootDir>/tsconfig.json",
6+
},
7+
},
8+
moduleDirectories: ["node_modules", "src"],
9+
modulePathIgnorePatterns: ["<rootDir>/dist"],
10+
preset: "ts-jest",
11+
roots: ["<rootDir>/src"],
12+
setupFilesAfterEnv: ["<rootDir>/src/setupTests.ts"],
13+
testEnvironment: "jsdom",
14+
};

package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"bugs": {
88
"url": "https://github.com/AndcultureCode/AndcultureCode.JavaScript.Core/issues"
99
},
10-
"dependencies": {},
10+
"dependencies": {
11+
"immutable": "4.0.0-rc.12"
12+
},
1113
"description": "Common patterns, functions, etc... used when building react applications",
1214
"devDependencies": {
1315
"@testing-library/jest-dom": "5.5.0",

0 commit comments

Comments
 (0)