Skip to content

Commit

Permalink
fix: build with noUnusedLocals
Browse files Browse the repository at this point in the history
Build passes with noUnusedLocals compiler option.
Fix involved explicit casting with InjectionToken<Document>.

fix maxisam#65
  • Loading branch information
SafeEval committed Jan 12, 2018
1 parent a687dec commit ae68190
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/clipboard.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ export function CLIPBOARD_SERVICE_PROVIDER_FACTORY(doc: Document, win: Window, p
}

export const CLIPBOARD_SERVICE_PROVIDER = {
deps: [DOCUMENT, WINDOW, [new Optional(), new SkipSelf(), ClipboardService]],
deps: [
DOCUMENT as InjectionToken<Document>,
WINDOW as InjectionToken<Document>,
[new Optional(), new SkipSelf(), ClipboardService]
],
provide: ClipboardService,
useFactory: CLIPBOARD_SERVICE_PROVIDER_FACTORY
};

0 comments on commit ae68190

Please sign in to comment.