Skip to content

Commit 4b17aee

Browse files
committed
getFileNodes optional params should be optional
1 parent 95dde3c commit 4b17aee

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ node dist
2121
```
2222

2323
## Todo
24+
* NPM publish
2425
* Cover more API endpoints
2526
* Write tests

src/figma-api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const getFile = (fileId: string, optionalParams?: getFileOptionalParams)
1313
return request(url);
1414
}
1515

16-
export const getFileNodes = (fileId: string, nodeIds: string, optionalParams: getFileNodesOptionalParams) => {
16+
export const getFileNodes = (fileId: string, nodeIds: string, optionalParams?: getFileNodesOptionalParams) => {
1717
let url = new URL(`https://api.figma.com/v1/files/${ fileId }/nodes`);
1818
url.searchParams.set('ids', nodeIds);
1919

@@ -28,4 +28,4 @@ export const getFileStyles = (fileId: string) => {
2828
let url = new URL(`https://api.figma.com/v1/files/${ fileId }/styles`);
2929

3030
return request(url);
31-
}
31+
}

0 commit comments

Comments
 (0)