Skip to content

Commit

Permalink
fix(typing): make stepper option optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Johann-S committed Oct 13, 2018
1 parent 17501c3 commit c10ced0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Create an instance of `Stepper`, accept two parameters.

Pass your `Stepper` DOMElement

- `options`
- `options` (optional)
- default value: `{ linear: true }`
- type: `Object`

Expand Down
4 changes: 2 additions & 2 deletions bs-stepper.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
declare type bsStepperOptions = {
declare type StepperOptions = {
linear: boolean,
};

declare class Stepper {
constructor(element: Element, _options: bsStepperOptions);
constructor(element: Element, _options?: StepperOptions);
next(): void;
previous(): void;
destroy(): void;
Expand Down
2 changes: 1 addition & 1 deletion src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const DEFAULT_OPTIONS = {
}

class Stepper {
constructor (element, _options) {
constructor (element, _options = {}) {
this._element = element
this._currentIndex = 0
this._stepsContents = []
Expand Down

0 comments on commit c10ced0

Please sign in to comment.