| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
I don’t think this change is valid. You can’t have an export * and an export =.
Sorry, something went wrong.
|
Ah alright, thanks for the response! Maybe this would require a more complex type, since after reviewing the lib/index.js it appears that both rehypeTocModule.default and rehypeTocModule actually exist: "use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.toc = void 0;
const rehype_toc_1 = require("./rehype-toc");
Object.defineProperty(exports, "toc", { enumerable: true, get: function () { return rehype_toc_1.toc; } });
__exportStar(require("./types"), exports);
// Export `toc` as the default export
exports.default = rehype_toc_1.toc;
// CommonJS default export hack
/* eslint-env commonjs */
if (typeof module === "object" && typeof module.exports === "object") {
module.exports = Object.assign(module.exports.default, module.exports);
}
//# sourceMappingURL=index.js.map |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Thanks for @jsdevtools/rehype-toc!
To avoid having to access .default in moduleResolution: 'Node16' or newer:
TypeScript Playground
Error message:
'moduleExpected' is declared but its value is never read.(6133) Type 'typeof import("file:///node_modules/@jsdevtools/rehype-toc/lib/index")' is not assignable to type '(...args: any[]) => any'. Type 'typeof import("file:///node_modules/@jsdevtools/rehype-toc/lib/index")' provides no match for the signature '(...args: any[]): any'.(2322)Interestingly I don't see a problem on Are the types wrong?:
cc @andrewbranch