"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getComponentDirectives = getComponentDirectives;
const language_core_1 = require("@vue/language-core");
const utils_1 = require("./utils");
const directiveRE = /^v[A-Z]/;
function getComponentDirectives(ts, program, fileName) {
    const sourceFile = program.getSourceFile(fileName);
    if (!sourceFile) {
        return [];
    }
    const checker = program.getTypeChecker();
    const directives = (0, utils_1.getVariableType)(ts, checker, sourceFile, language_core_1.names.directives);
    if (!directives) {
        return [];
    }
    return directives.type.getProperties()
        .map(({ name }) => name)
        .filter(name => directiveRE.test(name));
}
//# sourceMappingURL=getComponentDirectives.js.map