Skip to content

Commit 67bda44

Browse files
Merge pull request #19 from angular-package/4.1.x
4.1.0
2 parents 64539b5 + d88cc05 commit 67bda44

File tree

126 files changed

+11543
-26838
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+11543
-26838
lines changed

README.md

Lines changed: 718 additions & 302 deletions
Large diffs are not rendered by default.

package-lock.json

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

package.json

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,41 @@
11
{
2-
"name": "@angular-package/library",
3-
"version": "1.0.0",
2+
"name": "library",
3+
"version": "0.0.0",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",
7-
"build": "ng build type --prod",
8-
"test": "ng test",
9-
"lint": "ng lint"
7+
"build": "ng build",
8+
"watch": "ng build --watch --configuration development",
9+
"test": "ng test"
1010
},
1111
"private": true,
1212
"dependencies": {
13-
"@angular/animations": "~11.2.8",
14-
"@angular/common": "~11.2.8",
15-
"@angular/compiler": "~11.2.8",
16-
"@angular/core": "~11.2.8",
17-
"@angular/forms": "~11.2.8",
18-
"@angular/platform-browser": "~11.2.8",
19-
"@angular/platform-browser-dynamic": "~11.2.8",
20-
"@angular/router": "~11.2.8",
13+
"@angular/animations": "~12.0.1",
14+
"@angular/common": "~12.0.1",
15+
"@angular/compiler": "~12.0.1",
16+
"@angular/core": "~12.0.1",
17+
"@angular/forms": "~12.0.1",
18+
"@angular/platform-browser": "~12.0.1",
19+
"@angular/platform-browser-dynamic": "~12.0.1",
20+
"@angular/router": "~12.0.1",
2121
"rxjs": "~6.6.0",
22-
"tslib": "^2.0.0",
23-
"zone.js": "~0.11.3"
22+
"tslib": "^2.1.0",
23+
"zone.js": "~0.11.4"
2424
},
2525
"devDependencies": {
26-
"@angular-devkit/build-angular": "~0.1102.7",
27-
"@angular/cli": "~11.2.7",
28-
"@angular/compiler-cli": "~11.2.8",
26+
"@angular-devkit/build-angular": "~12.0.1",
27+
"@angular/cli": "~12.0.1",
28+
"@angular/compiler-cli": "~12.0.1",
2929
"@types/jasmine": "~3.6.0",
3030
"@types/node": "^12.11.1",
31-
"codelyzer": "^6.0.0",
32-
"jasmine-core": "~3.6.0",
33-
"jasmine-spec-reporter": "~5.0.0",
34-
"karma": "~6.1.0",
31+
"ajv": "^6.12.6",
32+
"jasmine-core": "~3.7.0",
33+
"karma": "~6.3.0",
3534
"karma-chrome-launcher": "~3.1.0",
3635
"karma-coverage": "~2.0.3",
3736
"karma-jasmine": "~4.0.0",
3837
"karma-jasmine-html-reporter": "^1.5.0",
39-
"ng-packagr": "^11.0.0",
40-
"protractor": "~7.0.0",
41-
"ts-node": "~8.3.0",
42-
"tslint": "~6.1.0",
43-
"typescript": "~4.1.5"
38+
"ng-packagr": "^12.0.0",
39+
"typescript": "~4.2.3"
4440
}
4541
}

packages/type/README.md

Lines changed: 718 additions & 302 deletions
Large diffs are not rendered by default.

packages/type/src/guard/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export { guardNumber } from './lib/guard-number.func';
1313
export { guardNull } from './lib/guard-null.func';
1414
export { guardObject } from './lib/guard-object.func';
1515
export { guardObjectKey } from './lib/guard-object-key.func';
16+
export { guardObjectKeys } from './lib/guard-object-keys.func';
1617
export { guardPrimitive } from './lib/guard-primitive.func';
1718
export { guardString } from './lib/guard-string.func';
1819
export { guardSymbol } from './lib/guard-symbol.func';

packages/type/src/guard/interface/guard-is.interface.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { GuardKey } from '../type/guard-key.type';
88
import { GuardNumber } from '../type/guard-number.type';
99
import { GuardObject } from '../type/guard-object.type';
1010
import { GuardObjectKey } from '../type/guard-object-key.type';
11+
import { GuardObjectKeys } from '../type/guard-object-keys.type';
1112
import { GuardPrimitive } from '../type/guard-primitive.type';
1213
import { GuardString } from '../type/guard-string.type';
1314
import { GuardType } from '../type/guard-type.type';
@@ -29,6 +30,7 @@ export interface GuardIs {
2930
number: GuardNumber;
3031
object: GuardObject;
3132
objectKey: GuardObjectKey;
33+
objectKeys: GuardObjectKeys,
3234
primitive: GuardPrimitive;
3335
string: GuardString;
3436
symbol: GuardSymbol;

packages/type/src/guard/lib/guard-array.func.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { ResultCallback } from '../../type/result-callback.type';
66
/**
77
* Guard the `value` to be an `Array` of a generic `Type`.
88
* @param value A generic `Type` `Array` `value` to guard.
9-
* @param callback Optional `ResultCallback` function to handle result before returns.
9+
* @param callback An optional `ResultCallback` function to handle result before returns.
1010
* @returns A `boolean` indicating whether or not the `value` is an `Array` of a generic `Type`.
1111
*/
1212
export const guardArray: GuardArray = <Type>(value: Array<Type>, callback?: ResultCallback): value is Array<Type> =>

packages/type/src/guard/lib/guard-boolean.func.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { GuardBoolean } from '../type/guard-boolean.type';
66
import { ResultCallback } from '../../type/result-callback.type';
77
/**
88
* Guard the `value` to be any type of a boolean.
9-
* @param value An `AnyBoolean` type `value` to guard.
9+
* @param value An `AnyBoolean` type from the `value` to guard.
1010
* @param callback An optional `ResultCallback` function to handle result before returns.
1111
* @returns A `boolean` indicating whether or not the `value` is a `boolean` type or `Boolean` object.
1212
*/

packages/type/src/guard/lib/guard-class.func.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import { GuardClass } from '../type/guard-class.type';
55
import { ResultCallback } from '../../type/result-callback.type';
66
/**
77
* Guard the `value` to be a generic `Class` type of `class`.
8-
* @param value A generic `Class` type `value` to guard.
8+
* @param value A generic `Class` type from the `value` to guard.
99
* @param callback An Optional `ResultCallback` function to handle result before returns.
1010
* @returns A `boolean` indicating whether or not the `value` is a generic `class`.
1111
*/
12-
export const guardClass: GuardClass = <Class>(value: Class, callback?: ResultCallback): value is Class =>
12+
export const guardClass: GuardClass = <Class extends Function>(value: Class, callback?: ResultCallback): value is Class =>
1313
isClass<Class>(value, callback);

packages/type/src/guard/lib/guard-defined.func.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import { Defined } from '../../type/defined.type';
55
import { GuardDefined } from '../type/guard-defined.type';
66
import { ResultCallback } from '../../type/result-callback.type';
77
/**
8-
* Guard the `value` to be defined.
9-
* @param value A generic type `value` to guard.
8+
* Guard the `value` to be defined, not `undefined`.
9+
* @param value A generic `Type` type from the `value` to guard.
1010
* @param callback An optional `ResultCallback` function to handle result before returns.
1111
* @returns A `boolean` indicating whether or not the `value` is defined, if `undefined` then returns `never`.
1212
*/
13-
export const guardDefined: GuardDefined = <Type>(value: Type, callback?: ResultCallback): value is Defined<Type> =>
13+
export const guardDefined: GuardDefined = <Type>(value: Defined<Type>, callback?: ResultCallback): value is Defined<Type> =>
1414
isDefined(value, callback);

0 commit comments

Comments
 (0)