async removeTypes(extension, code) {
    const { removeTypes } = require('babel-remove-types');

    if (extension === '.gts') {
      const { Preprocessor } = require('content-tag');
      const preprocessor = new Preprocessor();
      // Strip template tags
      const replacementClassMember = (i) => `template = __TEMPLATE_TAG_${i}__;`;
      const replacementExpression = (i) => `__TEMPLATE_TAG_${i}__`;
      const templateTagMatches = preprocessor.parse(code);
      let strippedCode = code;
      for (let i = 0; i < templateTagMatches.length; i++) {
        const match = templateTagMatches[i];
        const templateTag = substringBytes(code, match.range.start, match.range.end);
        if (match.type === 'class-member') {
          strippedCode = strippedCode.replace(templateTag, replacementClassMember(i));
        } else {
          strippedCode = strippedCode.replace(templateTag, replacementExpression(i));
        }
      }

      // Remove types
      const transformed = await removeTypes(strippedCode);

      // Readd stripped template tags
      let transformedWithTemplateTag = transformed;
      for (let i = 0; i < templateTagMatches.length; i++) {
        const match = templateTagMatches[i];
        const templateTag = substringBytes(code, match.range.start, match.range.end);
        if (match.type === 'class-member') {
          transformedWithTemplateTag = transformedWithTemplateTag.replace(replacementClassMember(i), templateTag);
        } else {
          // babel-remove-types uses prettier under the hood, and adds trailing `;` where allowed,
          // so we need to take that into account when restoring the template tags:
          transformedWithTemplateTag = transformedWithTemplateTag.replace(`${replacementExpression(i)};`, templateTag);
          transformedWithTemplateTag = transformedWithTemplateTag.replace(replacementExpression(i), templateTag);
        }
      }

      return transformedWithTemplateTag;
    }

    return await removeTypes(code);
  }
@private
    @method removeTypes
    @param {string} extension
    @param {string} code
    @return {Promise}