Skip to content

Commit

Permalink
Expose detectVersion function
Browse files Browse the repository at this point in the history
  • Loading branch information
alexprey committed May 7, 2019
1 parent 3d4066d commit 99e6f2c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,10 @@ module.exports.parse = (options) => new Promise((resolve, reject) => {
} catch (error) {
reject(error);
}
});
});

module.exports.detectVersion = (options) => {
validateOptions(options);

return SvelteVersionDetector.detectVersionFromOptions(options);
};
4 changes: 4 additions & 0 deletions typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ export interface SvelteComponentDoc {
* The name of the parsed component.
*/
name?: string|null;
/**
* The Svelte compiler version that used for this document.
*/
version?: number,
/**
* The component description.
*/
Expand Down

0 comments on commit 99e6f2c

Please sign in to comment.