diff --git a/api-tool/package.json b/api-tool/package.json index 406393d..872f955 100644 --- a/api-tool/package.json +++ b/api-tool/package.json @@ -37,6 +37,6 @@ "tslint": "^5.9.1", "tslint-eslint-rules": "^5.4.0", "tslint-react": "^3.4.0", - "typescript": "^3.0.0" + "typescript": "^4.5.0" } } \ No newline at end of file diff --git a/core/package.json b/core/package.json index 77b741f..be432a2 100644 --- a/core/package.json +++ b/core/package.json @@ -35,6 +35,6 @@ "tslint": "^5.9.1", "tslint-eslint-rules": "^5.4.0", "tslint-react": "^3.4.0", - "typescript": "^3.0.0" + "typescript": "^4.5.0" } } \ No newline at end of file diff --git a/etl/package.json b/etl/package.json index 3457468..10c826f 100644 --- a/etl/package.json +++ b/etl/package.json @@ -28,6 +28,6 @@ "tslint": "^5.9.1", "tslint-eslint-rules": "^5.4.0", "tslint-react": "^3.4.0", - "typescript": "^3.9.9" + "typescript": "^4.5.0" } } \ No newline at end of file diff --git a/event-bus/package.json b/event-bus/package.json index f23d85a..9722bcc 100644 --- a/event-bus/package.json +++ b/event-bus/package.json @@ -29,6 +29,6 @@ "tslint": "^5.9.1", "tslint-eslint-rules": "^5.4.0", "tslint-react": "^3.4.0", - "typescript": "^3.0.0" + "typescript": "^4.5.0" } } \ No newline at end of file diff --git a/fuentes-autenticas/package.json b/fuentes-autenticas/package.json index 7410864..414f19d 100644 --- a/fuentes-autenticas/package.json +++ b/fuentes-autenticas/package.json @@ -29,6 +29,6 @@ "tslint": "^5.9.1", "tslint-eslint-rules": "^5.4.0", "tslint-react": "^3.4.0", - "typescript": "^3.0.0" + "typescript": "^4.5.0" } -} +} \ No newline at end of file diff --git a/mongoose-plugin-audit/package.json b/mongoose-plugin-audit/package.json index 314b05d..710a214 100644 --- a/mongoose-plugin-audit/package.json +++ b/mongoose-plugin-audit/package.json @@ -28,6 +28,6 @@ "tslint": "^5.9.1", "tslint-eslint-rules": "^5.4.0", "tslint-react": "^3.4.0", - "typescript": "^3.0.0" + "typescript": "^4.5.0" } } \ No newline at end of file diff --git a/mongoose-plugin-audit/src/index.ts b/mongoose-plugin-audit/src/index.ts index 44f2e4b..e60a44e 100644 --- a/mongoose-plugin-audit/src/index.ts +++ b/mongoose-plugin-audit/src/index.ts @@ -40,12 +40,13 @@ export function MongooseAuditPlugin(updated = false) { // Define un método que debe llamarse en el documento principal antes de ejecutar .save() schema.methods.audit = function (req: any) { + const self = (this as any); if (req.user) { const user = { ... (req.user.usuario || req.user.app) }; user.organizacion = req.user.organizacion; - this.$audit = user; + self.$audit = user; } else { - this.$audit = req; + self.$audit = req; } }; @@ -91,7 +92,7 @@ export function MongooseAuditPlugin(updated = false) { }); schema.methods.original = function () { - return this._original; + return (this as any)._original; }; }; } diff --git a/mongoose-token-search/package.json b/mongoose-token-search/package.json index cdcb352..cc38a75 100644 --- a/mongoose-token-search/package.json +++ b/mongoose-token-search/package.json @@ -28,6 +28,6 @@ "tslint": "^5.9.1", "tslint-eslint-rules": "^5.4.0", "tslint-react": "^3.4.0", - "typescript": "^3.0.0" + "typescript": "^4.5.0" } } \ No newline at end of file diff --git a/mongoose-token-search/src/index.ts b/mongoose-token-search/src/index.ts index 4acb63d..dcf1f0a 100644 --- a/mongoose-token-search/src/index.ts +++ b/mongoose-token-search/src/index.ts @@ -27,7 +27,7 @@ export function TokenSearch(fields: string[]) { schema.methods._createTokens = function () { - const modelo = this; + const modelo = this as any; const tokens: string[] = []; diff --git a/package.json b/package.json index 3028e98..789b2e6 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "husky": "^3.0.4", "lerna": "2.8.0", "rimraf": "^2.6.2", - "typescript": "^2.5.2" + "typescript": "^4.5.0" }, "husky": { "hooks": { diff --git a/services/package.json b/services/package.json index 7f9ca49..1215bad 100644 --- a/services/package.json +++ b/services/package.json @@ -38,6 +38,6 @@ "tslint": "^5.9.1", "tslint-eslint-rules": "^5.4.0", "tslint-react": "^3.4.0", - "typescript": "^3.0.0" + "typescript": "^4.5.0" } } \ No newline at end of file diff --git a/tsconfig.base.json b/tsconfig.base.json index 9ff4f19..34966bc 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -14,6 +14,7 @@ "strict": true, "pretty": true, "jsx": "react", - "suppressImplicitAnyIndexErrors": true + "suppressImplicitAnyIndexErrors": true, + "skipLibCheck": true } } \ No newline at end of file