cutePuppyPics sample variable declaration

I’ve installed the cutePuppyPics sample and I’m only able to declare variables/objects etc. in the constructor function. If it’s outside it I get an Unexpected token error.

Any idea why?



If the unexpected token is a colon, perhaps you’ve not used the --ts command option to pull the TypeScript version of the starter, and are trying to feed it TypeScript.

1 Like

Oh yeah duh, that was totally it. I’m so new to typescript I didn’t realize the extension was .js as well.

I didn’t see the --ts anywhere in the getting started, but it worked great.

Thanks for the help.