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