How to enable autocomplete for Google Apps Script in locally-installed IDE

后端 未结 5 1893
深忆病人
深忆病人 2020-12-01 01:42

I\'m trying to build GAS projects locally using clasp.

Any locally-installed IDE is a huge improvement over Google\'s Script Editor, so the tool looks very promising

5条回答
  •  Happy的楠姐
    2020-12-01 02:18

    I found the solution that partially works, but it may not be applicable to other software. The steps below are for Visual Studio Code:

    1. Install the NPM package containing type definitions for GAS using

      https://www.npmjs.com/package/@types/google-apps-script
      
    2. In your locally-saved script, create a '.js' file and type

      import 'google-apps-script';
      

提交回复
热议问题