Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. export abstract class ABaseModel {
  2. public static isKeyOf<T>(propName: (keyof T)): string {
  3. return propName;
  4. }
  5. }
  6.  
  7. export class Model extends ABaseModel {
  8.  
  9. public id: number;
  10. public uid: string;
  11. public createdByUid: string;
  12. }
  13.  
  14. Model.isKeyOf<Model>('id');
  15.  
  16. Model.isKeyOf('id');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement