@shopify/theme-language-server-common
Version:
<h1 align="center" style="position: relative;" > <br> <img src="https://github.com/Shopify/theme-check-vscode/blob/main/images/shopify_glyph.png?raw=true" alt="logo" width="141" height="160"> <br> Theme Language Server </h1>
15 lines • 824 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.isJSONRequestContext = exports.isLiquidRequestContext = void 0;
const theme_check_common_1 = require("@shopify/theme-check-common");
function isLiquidRequestContext(context) {
const { doc, schema, parsed } = context;
return (doc.type === theme_check_common_1.SourceCodeType.LiquidHtml && !!schema && !(0, theme_check_common_1.isError)(doc.ast) && !(0, theme_check_common_1.isError)(parsed));
}
exports.isLiquidRequestContext = isLiquidRequestContext;
function isJSONRequestContext(context) {
const { doc } = context;
return doc.type === theme_check_common_1.SourceCodeType.JSON && !(0, theme_check_common_1.isError)(doc.ast);
}
exports.isJSONRequestContext = isJSONRequestContext;
//# sourceMappingURL=RequestContext.js.map
;