{"record":{"id":"4db5c52405f18160","repo":"usablica/intro.js","slug":"introjs-is-deprecated-please-use-introjs-tour","errorCode":null,"errorMessage":"introJs() is deprecated. Please use introJs.tour() or introJs.hint() instead.","messagePattern":"introJs\\(\\) is deprecated\\. Please use introJs\\.tour\\(\\) or introJs\\.hint\\(\\) instead\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/index.ts","lineNumber":41,"sourceCode":"    );\n  }\n\n  /**\n   * @deprecated introJs().removeHints() is deprecated, please use introJs.hint.hideHints() instead\n   * @param args\n   */\n  removeHints(..._: any[]) {\n    console.error(\n      \"introJs().removeHints() is deprecated, please use introJs.hint.removeHints() instead.\"\n    );\n  }\n}\n\n/**\n * Intro.js module\n */\nconst introJs = (elementOrSelector?: string | HTMLElement) => {\n  console.warn(\n    \"introJs() is deprecated. Please use introJs.tour() or introJs.hint() instead.\"\n  );\n  return new LegacyIntroJs(elementOrSelector);\n};\n\n/**\n * Create a new Intro.js Tour instance\n * @param elementOrSelector Optional target element to start the Tour on\n */\nintroJs.tour = (elementOrSelector?: string | HTMLElement) =>\n  new Tour(elementOrSelector);\n\n/**\n * Create a new Intro.js Hint instance\n * @param elementOrSelector Optional target element to start the Hint on\n */\nintroJs.hint = (elementOrSelector?: string | HTMLElement) =>\n  new Hint(elementOrSelector);","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/usablica/intro.js/blob/e5517e6a24e0530f87885af9fb2a69bafd1d4a6b/src/index.ts#L23-L59","documentation":"This is a deprecation warning (not an exception) emitted via console.warn when the legacy introJs() factory is called. The library split into introJs.tour() and introJs.hint(), and introJs() now returns a LegacyIntroJs instance kept only for backward compatibility. Code will still run but should migrate.","triggerScenarios":"Any direct call: introJs(); introJs('#target'); introJs(document.body); including old initialization snippets or wrappers that still call the bare factory.","commonSituations":"Upgrading Intro.js across the major version that split the API; copy-pasted legacy integration code; third-party wrapper libraries or docs examples still using introJs(element).","solutions":["Replace introJs(el) with introJs.tour(el) when starting a guided tour.","Replace introJs(el) with introJs.hint(el) when adding hint bubbles.","Audit wrappers/imports for the legacy call and update them; silence or fix warnings surfaced in CI logs.","Consult the migration guide for renamed options between the legacy and new API."],"exampleFix":"// before\nconst intro = introJs('#steps');\nintro.start();\n// after\nconst tour = introJs.tour('#steps');\ntour.start();","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use introJs.tour() for tours and introJs.hint() for hints exclusively in new code.","Grep the codebase and dependencies for 'introJs(' legacy calls during upgrades.","Watch console warnings in dev/CI to catch deprecated usage early.","Pin and review the migration guide when bumping Intro.js major versions."],"tags":["deprecation","api-change","migration"],"backgroundTag":"deprecated-api-call","analyzedSha":"e5517e6a24e0530f87885af9fb2a69bafd1d4a6b","analyzedAt":"2026-08-31T22:12:26.007Z","schemaVersion":2},"datasetVersion":"2026-08-31T22:30:34.772Z"}