veliovgroup / Meteor-flow-router-title

Change document.title on the fly within flow-router
https://atmospherejs.com/ostrio/flow-router-title
BSD 3-Clause "New" or "Revised" License
25 stars 4 forks source link

TypeError: FlowRouterTitle is not a constructor #14

Open carlosalvidrez opened 1 year ago

carlosalvidrez commented 1 year ago

Trying to use this library for the first time. The extra package (dependency) works without issues. I can also import this package. I removed the original FlowRouter packages (as per the instructions).

But when I add this line to instantiate it, as per the docs, I get the error "TypeError: FlowRouterTitle is not a constructor"

import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
import {FlowRouterTitle} from 'meteor/ostrio:flow-router-title';
[I DECLARE SOME ROUTES HERE]
new FlowRouterTitle(FlowRouter);  <-- THROWS ERROR

Latest flow-router-title version Meteor 2.8.1 (latest) Chrome Mac

dr-dimitru commented 4 months ago

Hello @carlosalvidrez,

This lib missing typescipt definitions, use it outside of .ts file, otherwise you may need to submit a PR with TS definitions