Advertisement
Guest User

Untitled

a guest
Apr 9th, 2020
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Type {
  2.     propA: string = 10;
  3.     propB: number;
  4. }
  5.  
  6. const fn = (param: Type) => {
  7.  console.log(param);
  8. };
  9.  
  10. fn({
  11.     propB: 10;
  12. });
  13.  
  14. //// print { propB: 10 }
  15.  
  16.  
  17. //// How I can set propA when param no has it?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement