Newly generated bundles that use the reddit service currently fail to compile.
The odd thing is that it does not affect the sample bundle which still builds fine.
How to reproduce
Create a fresh nodecg install and install nodecg-io (current main or 0.2)
Generate a new bundle that uses the reddit service using nodecg-io generate
Bundle fails to compile with the error below
Error Log
Compile failure:
```
> tsc -b
node_modules/reddit-ts/src/RedditAPI.ts:185:25 - error TS2345: Argument of type 'Child | undefined' is not assignable to parameter of type 'Child'.
Type 'undefined' is not assignable to type 'Child'.
185 return map_search(data.children[0])
~~~~~~~~~~~~~~~~
Found 1 error.
```
Description
Newly generated bundles that use the reddit service currently fail to compile. The odd thing is that it does not affect the sample bundle which still builds fine.
How to reproduce
main
or0.2
)nodecg-io generate
Error Log
Compile failure:
``` > tsc -b node_modules/reddit-ts/src/RedditAPI.ts:185:25 - error TS2345: Argument of type 'Child | undefined' is not assignable to parameter of type 'Child'. Type 'undefined' is not assignable to type 'Child'. 185 return map_search(data.children[0]) ~~~~~~~~~~~~~~~~ Found 1 error. ```