fix(model): 🏷️ wrong types for credential store
This commit is contained in:
parent
007f9deee0
commit
8f3aeec10b
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@cohabit/ressources",
|
"name": "@cohabit/ressources",
|
||||||
"version": "0.1.0",
|
"version": "0.1.1",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./mod.ts",
|
".": "./mod.ts",
|
||||||
"./models": "./src/models/mod.ts"
|
"./models": "./src/models/mod.ts"
|
||||||
|
|
|
@ -36,14 +36,14 @@ export class Credential<T extends CredentialCategory> extends Ressource {
|
||||||
}: {
|
}: {
|
||||||
name: Credential<T>['name']
|
name: Credential<T>['name']
|
||||||
category: T
|
category: T
|
||||||
store: Credential<T>['store']
|
store: CredentialStore<T>['store']
|
||||||
avatar?: Credential<T>['avatar']
|
avatar?: Credential<T>['avatar']
|
||||||
}): Credential<T> {
|
}): Credential<T> {
|
||||||
return this.create({ category, store, name, avatar })
|
return this.create({ category, store, name, avatar })
|
||||||
}
|
}
|
||||||
|
|
||||||
#category: T
|
#category: T
|
||||||
#store: Readonly<CredentialStore<T>>
|
#store: Readonly<CredentialStore<T>['store']>
|
||||||
|
|
||||||
private constructor(
|
private constructor(
|
||||||
{ category, store, ...props }:
|
{ category, store, ...props }:
|
||||||
|
@ -102,7 +102,7 @@ export class Credential<T extends CredentialCategory> extends Ressource {
|
||||||
export interface Credential<T extends CredentialCategory> extends Ressource {
|
export interface Credential<T extends CredentialCategory> extends Ressource {
|
||||||
type: 'credential'
|
type: 'credential'
|
||||||
category: T
|
category: T
|
||||||
store: Readonly<CredentialStore<T>>
|
store: Readonly<CredentialStore<T>['store']>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type CredentialCategory = 'password' | 'ssh' | 'passkey'
|
export type CredentialCategory = 'password' | 'ssh' | 'passkey'
|
||||||
|
|
Loading…
Reference in a new issue