phero-hq / phero

Full-stack type-safety with pure TypeScript

Home Page:https://phero.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

S145: ParserModel not implemented yet (kind:178)

parweb opened this issue · comments

commented

I think I find a bug or missing feature

in my phero.ts file
I've got

import { createService } from '@phero/server';

type Id = number | string;

interface User {
  id: Id;
  email: string;
}

async function update(data: Partial<User>): Promise<User> {
  return { id: 1, email: 'plop@email.com' };
}

export const user = createService({ update });

but got an error

error TS-PheroError:
S145: ParserModel not implemented yet: `Id` (kind:178)

When I debug the code I find the problematic line

Partial<User> on async function update(data: Partial<User>): Promise<User> {

indeed if we change Partial<User> to User for example everything is ok

Is it an known bug ?

Just tested this, I can confirm this is a bug.
I'll try to fix this asap.

Fix is on its way @parweb
#78

commented

nice

@parweb Just released 0.9.11.
You should update both @phero/server and @phero/client and run Phero with the npx phero@latest command.
Can you please confirm if the issue is resolved for you? Thanks in advance :)

commented

let's test this

commented

It's working

I found an another bug will open a new issue

Thanks for reporting.

Sorry to hear you stumbled upon another bug. Lets see how fast we can fix that one :)

commented

No worries it's for a hobby project love the phylosophy of your tool 👍
Happy to help stabalize it