Analyzes MiniScript and suggests types. Recommended to be used with greybel-core even though it should be also able to digest miniscript-core AST.
import {
5B2B
miniscriptMeta } from 'miniscript-meta';
import { Parser } from 'greybel-core';
const typeManager = new TypeManager({
container: greyscriptMeta
});
const parser = new Parser(content, {
unsafe: true
});
const chunk = parser.parseChunk();
typeManager.analyze(document.uri, chunk);
const allIdentifier = typeManager.getRootScopeContext().scope.getAvailableIdentifier();
console.log(`Your code includes: ${allIdentifier.size}`);