• Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
brainCloud Forums

Are the Cloud Code type definitions (.d.ts) in the local setup guide outdated?

Scheduled Pinned Locked Moved Unsolved Cloud Code
4 Posts 2 Posters 39 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    moondory77
    wrote last edited by
    #1

    Hello,
    I am currently setting up a local development environment for Cloud Code using TypeScript, following this guide: https://help.getbraincloud.com/en/articles/8705906-using-cloud-code-type-declaration-files-in-your-local-vscode

    However, I noticed that the .d.ts files provided in the article seem to have some discrepancies with the current API. It appears they might be a bit outdated.

    Is there a way to obtain the most up-to-date type declaration files that match the latest API version?

    1 Reply Last reply
    0
  • J Offline
    J Offline
    JasonL bitHeads
    wrote last edited by
    #2

    Thanks for pointing this out. We’ve updated the linked file to the latest version.

    Also, I’d like to mention that we’ve created a Visual Studio Code extension for Cloud Code scripts. It includes IntelliSense and other helpful features that you may want to give it a try.

    You can find more details here:
    https://forums.getbraincloud.com/topic/307/early-access-visual-studio-code-extension

    1 Reply Last reply
    0
  • M Offline
    M Offline
    moondory77
    wrote last edited by
    #3

    Thanks for the update and the recommendation!

    Regarding the extension, does it allow us to configure a specific target directory for syncing?

    Since I work in TypeScript, my workflow involves transpiling TS files into a separate output folder (e.g., ./dist) as JavaScript. Currently, I have to manually copy-paste these resulting JS files into the BrainCloud console, which is quite tedious.

    If the extension can be configured to watch and sync the transpiled JS files from my build folder (instead of the source TS files), it would greatly streamline my workflow. Is this currently possible?

    1 Reply Last reply
    0
  • J Offline
    J Offline
    JasonL bitHeads
    wrote last edited by
    #4

    Thanks for reaching out and for raising the question.

    At the moment, the VS Code extension does not support targeting or importing from a specific directory. Its primary purpose is to synchronize Cloud Scripts stored in brainCloud and provide a convenient way to edit them using standard VS Code workflows and tooling.

    We have created an internal task to review this limitation and discuss potential improvements to the extension so that it better supports directory-based workflows in the future.

    In the meantime, one practical workaround is to export your Cloud Scripts directly from the brainCloud portal. Once exported, all scripts can be reviewed locally. You can then organize them into a folder structure that mirrors your desired layout, including the use of subfolders and .ccjs files. From there, you can zip the contents and import them back into your app, which can significantly reduce the need for repetitive copy and paste actions across individual files.

    Please let us know if this approach works for your use case or if you have additional feedback on how you would like to see the extension evolve.

    1 Reply Last reply
    0

  • Login

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users