From 8b4ab47d897f5baee15f584a0dd289d38e5dc218 Mon Sep 17 00:00:00 2001 From: eight Date: Sat, 13 Oct 2018 15:20:10 +0800 Subject: [PATCH] Add: some type hint --- background/style-manager.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/background/style-manager.js b/background/style-manager.js index 7031d5b8..fb5b1f00 100644 --- a/background/style-manager.js +++ b/background/style-manager.js @@ -14,8 +14,24 @@ to cleanup the temporary code. See /edit/live-preview.js. */ const styleManager = (() => { const preparing = prepare(); + + /* styleId => { + data: styleData, + preview: styleData, + appliesTo: Set + } */ const styles = new Map(); + + /* url => { + maybeMatch: Set, + sections: Object { + id: styleId, + enabled: Boolean, + code: String + }> + } */ const cachedStyleForUrl = createCache(); + const BAD_MATCHER = {test: () => false}; const compileRe = createCompiler(text => `^(${text})$`); const compileSloppyRe = createCompiler(text => `^${text}$`);