Advertisement
Guest User

Untitled

a guest
Nov 30th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. myFunction(text: string, value: string, ...extraValues: string[]): MyTypeOfClass {
  2.         const valuesConfig: MyTypeOfClassValueConfigBLAblalbal[] = [
  3.             {
  4.                 key1: value,
  5.                 key2: true,
  6.             }
  7.         ];
  8.         extraValues.forEach(extraValue => {
  9.             valuesConfig.push(
  10.                 {
  11.                     key1: value,
  12.                     key2: false
  13.                 }
  14.             );
  15.         });
  16.         return {
  17.             label: text,
  18.             id: '',
  19.             values: valuesConfig,
  20.             disabled: true
  21.         };
  22.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement