All files / resolver typeResolutionError.js

0% Statements 0/3
100% Branches 0/0
0% Functions 0/1
0% Lines 0/3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21                                         
/**
 * Emitted by the type resolver to indicate that there was some bork where the
 * types could not be deducted. Stores node position and also attempted
 * candidates if possible. Reference `node.typeCandidates` and see the
 * {@link Node} class for more info on how to access information for generating
 * an error.
 */
export default class TypeResolutionError extends Error {
    /**
     * Creates an error given node and message. If you are in a resolver we
     * reccomend using the `#emit(message:)` function which will automatically
     * handle all of this stuff.
     */
    constructor(message: string, node: Node) {
        super(message);
 
        this.name = "TypeResolutionError";
        this.node = node;
    }
}