Skip to content

Commit

Permalink
Combine brave-extension types with brave-core
Browse files Browse the repository at this point in the history
  • Loading branch information
bbondy committed Feb 21, 2019
1 parent 7c9b0b5 commit 22655b3
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 89 deletions.
3 changes: 0 additions & 3 deletions components/brave_extension/extension/brave_extension/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ transpile_web_ui("brave_extension") {
"types/constants/tabTypes.ts",
"types/constants/webNavigationTypes.ts",
"types/constants/windowTypes.ts",
"types/global/chrome.d.ts",
"types/global/react-chrome-redux.d.ts",
"types/global/tests.d.ts",
"types/other/blockTypes.ts",
"types/other/noScriptInfo.ts",
"types/state/mainState.ts",
Expand Down

This file was deleted.

This file was deleted.

33 changes: 33 additions & 0 deletions components/definitions/chromel.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,36 @@ declare namespace chrome.rewardsNotifications {
addListener: (callback: (id: string, type: number, timestamp: number) => void) => void
}
}

type BlockTypes = 'ads' | 'trackers' | 'httpUpgradableResources' | 'javascript' | 'fingerprinting'

interface BlockDetails {
blockType: BlockTypes
tabId: number
subresource: string
}

interface BlockDetails {
blockType: BlockTypes
tabId: number
subresource: string
}
declare namespace chrome.tabs {
const setAsync: any
const getAsync: any
}

declare namespace chrome.windows {
const getAllAsync: any
}

declare namespace chrome.braveShields {
const onBlocked: {
addListener: (callback: (detail: BlockDetails) => void) => void
emit: (detail: BlockDetails) => void
}

const allowScriptsOnce: any
const javascript: any
const plugins: any
}
File renamed without changes.
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"noUnusedLocals": true
},
"include": [
"./components/definitions/*"
"./components/definitions/*",
"./components/brave_extension/extension/brave_extension/types/**/*"
]
}

0 comments on commit 22655b3

Please sign in to comment.