style: Fix TS errors
This commit is contained in:
parent
78f6b3fb15
commit
b9a4fe2ad6
|
@ -10,6 +10,8 @@ export class AesCryptoKey extends SymmetricKey {
|
||||||
@JsonProp({name: "k", converter: JsonBase64UrlConverter})
|
@JsonProp({name: "k", converter: JsonBase64UrlConverter})
|
||||||
public data!: Buffer;
|
public data!: Buffer;
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
public get alg() {
|
public get alg() {
|
||||||
switch (this.algorithm.name.toUpperCase()) {
|
switch (this.algorithm.name.toUpperCase()) {
|
||||||
case "AES-CBC":
|
case "AES-CBC":
|
||||||
|
|
|
@ -10,6 +10,8 @@ export class DesCryptoKey extends SymmetricKey {
|
||||||
@JsonProp({name: "k", converter: JsonBase64UrlConverter})
|
@JsonProp({name: "k", converter: JsonBase64UrlConverter})
|
||||||
public data!: Buffer;
|
public data!: Buffer;
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
public get alg() {
|
public get alg() {
|
||||||
switch (this.algorithm.name.toUpperCase()) {
|
switch (this.algorithm.name.toUpperCase()) {
|
||||||
case "DES-CBC":
|
case "DES-CBC":
|
||||||
|
|
|
@ -9,6 +9,8 @@ export class HmacCryptoKey extends CryptoKey {
|
||||||
|
|
||||||
public algorithm!: HmacKeyAlgorithm;
|
public algorithm!: HmacKeyAlgorithm;
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
protected get alg() {
|
protected get alg() {
|
||||||
const hash = this.algorithm.hash.name.toUpperCase();
|
const hash = this.algorithm.hash.name.toUpperCase();
|
||||||
return `HS${hash.replace("SHA-", "")}`;
|
return `HS${hash.replace("SHA-", "")}`;
|
||||||
|
|
Reference in New Issue