Skip to content

Commit

Permalink
Strip all extraneous type import characters (#2090)
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeembrey authored and dotansimha committed Jul 3, 2019
1 parent ce26497 commit 74d0596
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/plugins/other/visitor-plugin-common/src/utils.ts
Expand Up @@ -269,7 +269,7 @@ export function getRootTypeNames(schema: GraphQLSchema): string[] {
}

export function stripMapperTypeInterpolation(identifier: string): string {
return identifier.includes('{T}') ? identifier.replace(/<.*?>/g, '') : identifier;
return identifier.trim().replace(/[^$\w].*$/, '');
}

export const OMIT_TYPE = 'export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;';

0 comments on commit 74d0596

Please sign in to comment.