无法推断此Map的类型

kupeojn6  于 2021-09-13  发布在  Java
关注(0)|答案(0)|浏览(221)

我一直在努力让我的头脑去定义 TESTS 对象,但仍然无法理解任何内容。如果有人知道它应该是什么类型,并解释我是如何开始学习ts的,这将非常有帮助。下面是我要谈论的对象:

const TESTS = [
   ['reminderEmail', new Map([  
     ['subject', { test: 'equal', expected: 'Kindly complete your setup' }],
     ['headers', new Map([
       ['X-Link', { test: 'equal', expected: configUrl('syncUrl', 'reminder-mail') }],
       ['X-Template-Name', { test: 'equal', expected: 'reminderFirst' }],
       ['X-Template-Version', { test: 'equal', expected: TEMPLATE_VERSIONS.reminderFirst }],
     ])],
     ['html', [
       { test: 'include', expected: "Here's your reminder" },
       { test: 'include', expected: config.smtp.androidUrl },
       { test: 'include', expected: config.smtp.iosUrl },
       { test: 'include', expected: 'device' },
     ]],
     ['text', [
       { test: 'include', expected: "Here's your reminder" },
       { test: 'notInclude', expected: config.smtp.androidUrl },
       { test: 'notInclude', expected: config.smtp.iosUrl },
       { test: 'notInclude', expected: 'utm_source=email' },
     ]],
   ])],       
 ];

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题