From cdfd54ed99087dc4a7a3fd13865849ff9ce9e8ba Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 19 May 2019 21:34:08 +0900 Subject: Use TSyringe on background script --- src/background/repositories/CompletionsRepository.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/background/repositories/CompletionsRepository.ts') diff --git a/src/background/repositories/CompletionsRepository.ts b/src/background/repositories/CompletionsRepository.ts index 18af587..dfdbc27 100644 --- a/src/background/repositories/CompletionsRepository.ts +++ b/src/background/repositories/CompletionsRepository.ts @@ -1,6 +1,9 @@ +import { injectable } from 'tsyringe'; + type Tab = browser.tabs.Tab; type BookmarkTreeNode = browser.bookmarks.BookmarkTreeNode; +@injectable() export default class CompletionsRepository { async queryBookmarks(keywords: string): Promise { let items = await browser.bookmarks.search({ query: keywords }); -- cgit v1.2.3