UNPKG

@prisma/language-server

Version:
17 lines 477 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getFieldType = getFieldType; function getFieldType(line) { const wordsInLine = line.split(/\s+/); if (wordsInLine.length < 2) { return undefined; } // Field type is in second position // myfield String const fieldType = wordsInLine[1]; if (fieldType.length !== 0) { return fieldType; } return undefined; } //# sourceMappingURL=fields.js.map