Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions for using this library #17

Open
vjpr opened this issue Oct 15, 2021 · 3 comments
Open

Add instructions for using this library #17

vjpr opened this issue Oct 15, 2021 · 3 comments

Comments

@vjpr
Copy link

vjpr commented Oct 15, 2021

I am not clear on how best to use this library. Do I need to make tsconfig.json changes? Or ///reference..

Do I use "typeRoots": ["./node_modules/@types", "./node_modules/chrome-types"]?

@piedrahitapablo
Copy link

@vjpr what I did was creating a chrome.d.ts file inside my types folder and added this as its content:

/// <reference types="chrome-types" />

declare global {
  interface Window {
    chrome: chrome;
  }
}

not really sure if that's the correct way to do it, but it's working. Hope this helps!

MichaelSolati added a commit to MichaelSolati/chrome-types that referenced this issue Mar 2, 2022
@olso-nordsec
Copy link

olso-nordsec commented Jul 29, 2022

For now I'm using it like this, I'm not a fan of referencing from global scope

globalThis is for MV3 because SW

I had to use patch-package

SCR-20220729-h67

@tusharmath
Copy link

This is funny, an awesome library, but the usage section doesn't document how to use it :P

Made this PR — #39 hope it helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants