Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
feat: add ES6 modules/TypeScript compatible export (#94)
Browse files Browse the repository at this point in the history
Closes #74


## Reviewer checks

**Required fields, to be filled out by PR reviewer(s)**
- [x] Follows the commit message policy, appropriate for next version
- [x] Has documentation updated, a DU ticket, or requires no documentation change
- [x] Includes new tests, or was unnecessary
- [x] Code is reviewed for security by: @WilcoFiers
  • Loading branch information
stephenmathieson authored Nov 26, 2018
1 parent 05d832c commit eee46c9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ AxeBuilder.prototype.analyze = function(callback) {
// Check if the provided `callback` uses the old argument signature (an arity of 1). If it does, provide a helpful deprecation warning.
var isOldAPI = callback && callback.length === 1;
if (isOldAPI) {
deprecate('Error must be handled as the first argument of axe.analyze. See: #83');
deprecate(
'Error must be handled as the first argument of axe.analyze. See: #83'
);
}

return new Promise((resolve, reject) => {
Expand Down Expand Up @@ -185,3 +187,6 @@ AxeBuilder.prototype.analyze = function(callback) {
};

exports = module.exports = AxeBuilder;

// TypeScript/ES6 module support (see #74).
exports.default = AxeBuilder;

0 comments on commit eee46c9

Please sign in to comment.