📜  figma 文档 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:12.997000             🧑  作者: Mango

代码示例3
// The ': string[]' is an annotation
let list: string[] = []
for (const node of figma.currentPage.selection) {
  list.push(node.type)
}

// The ': number' are also annotations
function doThing(x: number, str: string) {
  // ...
}