I want to get a "postType" Property from an interface defined like this
export interface PostType {
postType: {
title?: string;
content?: string;
};
}
The purpose I want to take out and use the "postType" Property is as follows
const fn = (post: Post) => {
...
}
I used "Pick" but this doesn't work.
export type Post = Pick<PostType, 'postType'>;
The reason I've configured the interface above is that PostType is actually a property that corresponds to another interface.
So I have to follow PostType's interface.
How can I do this?