Trying to do an chrome extension with angular2 and typescript, I am stuck in how to get access to the chrome API (chrome.bookmarks in particular).
I do have access to the chrome object by following angular2 chrome extension chrome.runtime.sendMessage from typescript
But even though I can access to chrome, I cannot to chrome.bookmarks
manifest.json
{
"manifest_version": 2,
"name": "x",
"short_name": "x",
"description": "x",
"version": "0.1.0",
"author": "x",
"permissions": [
"bookmarks",
"https://ajax.googleapis.com/"
]
}
And then, it seems that I should be accessing chrome through @types as suggested here Using chrome extension apis in typescript
But I can't find how. Should I import what? import { Chrome, filesystem, filewriter } from '@types';
? I'm lost here, and I cannot find documentation about that (what makes me believe it is not a good idea to use angular2 for a chrome extension)