fix(model): 🏷️ wrong types for credential store

This commit is contained in:
Julien Oculi 2024-06-19 16:16:25 +02:00
parent 007f9deee0
commit 8f3aeec10b
2 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@cohabit/ressources",
"version": "0.1.0",
"version": "0.1.1",
"exports": {
".": "./mod.ts",
"./models": "./src/models/mod.ts"

View file

@ -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'