Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

How to add something to the interface to avoid loosing on re-generation? #54

Closed
murbanowicz opened this issue Sep 24, 2018 · 7 comments
Closed

Comments

@murbanowicz
Copy link

I need to modify the interface file to reflect e.g. data injected in hooks etc
but at the moment I do not find the place in the code which would allow to do it with avoiding loosing it at re-generation.
Any advice?

@eddyystop
Copy link
Member

eddyystop commented Sep 24, 2018

@j2L4e ^^^ Let me know where you want the // !code or the // ! code if you do want them.

@j2L4e
Copy link
Member

j2L4e commented Sep 24, 2018

@murbanowicz we could generate the following
(service 'users')

interface UserBase {
  name: string;
  // ... everything that's generated now
}

// !code: interface-users-more
export interface User extends UserBase {
  extra: any;
}
// !end

This would allow both regeneration and extra properties. would this help your case, @murbanowicz?

@murbanowicz
Copy link
Author

Yeah! Look great to me. I think others would also benefit in the future (TS with Feathers improving but still not straightforward to work with, so I think community using TS with Feathers will grow especially with that great support from you!)

@eddyystop
Copy link
Member

Does this work?

interface UserBase {
  name: string;
  // ... everything that's generated now
}

export interface User extends UserBase {
  // !code: more // !end
}

@eddyystop
Copy link
Member

Published as f+/cli v0.7.33 using generator v0.6.32

@eddyystop
Copy link
Member

Follow on issue #56

@eddyystop
Copy link
Member

@murbanowicz Hi. I've written an article referencing this issue. You are mentioned in it. Do you want any changes to those references? The draft is at https://medium.com/@eddyystop/keep-your-app-up-to-the-minute-with-feathers-plus-cli-57021f24e548

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants