style: Fix TS errors

This commit is contained in:
microshine 2021-01-11 13:01:50 +03:00
parent 78f6b3fb15
commit b9a4fe2ad6
3 changed files with 6 additions and 0 deletions

View File

@ -10,6 +10,8 @@ export class AesCryptoKey extends SymmetricKey {
@JsonProp({name: "k", converter: JsonBase64UrlConverter})
public data!: Buffer;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
public get alg() {
switch (this.algorithm.name.toUpperCase()) {
case "AES-CBC":

View File

@ -10,6 +10,8 @@ export class DesCryptoKey extends SymmetricKey {
@JsonProp({name: "k", converter: JsonBase64UrlConverter})
public data!: Buffer;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
public get alg() {
switch (this.algorithm.name.toUpperCase()) {
case "DES-CBC":

View File

@ -9,6 +9,8 @@ export class HmacCryptoKey extends CryptoKey {
public algorithm!: HmacKeyAlgorithm;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
protected get alg() {
const hash = this.algorithm.hash.name.toUpperCase();
return `HS${hash.replace("SHA-", "")}`;