index.js(10,12): error TS2749: 'Thing' refers to a value, but is being used as a type here. Did you mean 'typeof Thing'?
index.js(17,16): error TS2749: 'Thing' refers to a value, but is being used as a type here. Did you mean 'typeof Thing'?


==== usage.js (0 errors) ====
    const { Thing, useThing, cbThing } = require("./index");
    
    useThing(Thing.a);
    
    /**
     * @typedef {Object} LogEntry
     * @property {string} type
     * @property {number} time
     */
    
    cbThing(type => {
        /** @type {LogEntry} */
        const logEntry = {
            time: Date.now(),
            type,
        };
    });
    
==== index.js (2 errors) ====
    /** @enum {string} */
    const Thing = Object.freeze({
        a: "thing",
        b: "chill"
    });
    
    exports.Thing = Thing;
    
    /**
     * @param {Thing} x
               ~~~~~
!!! error TS2749: 'Thing' refers to a value, but is being used as a type here. Did you mean 'typeof Thing'?
     */
    function useThing(x) {}
    
    exports.useThing = useThing;
    
    /**
     * @param {(x: Thing) => void} x
                   ~~~~~
!!! error TS2749: 'Thing' refers to a value, but is being used as a type here. Did you mean 'typeof Thing'?
     */
    function cbThing(x) {}
    
    exports.cbThing = cbThing;
    