Add: some type hint
This commit is contained in:
parent
7d340d62dc
commit
8b4ab47d89
|
@ -14,8 +14,24 @@ to cleanup the temporary code. See /edit/live-preview.js.
|
||||||
*/
|
*/
|
||||||
const styleManager = (() => {
|
const styleManager = (() => {
|
||||||
const preparing = prepare();
|
const preparing = prepare();
|
||||||
|
|
||||||
|
/* styleId => {
|
||||||
|
data: styleData,
|
||||||
|
preview: styleData,
|
||||||
|
appliesTo: Set<url>
|
||||||
|
} */
|
||||||
const styles = new Map();
|
const styles = new Map();
|
||||||
|
|
||||||
|
/* url => {
|
||||||
|
maybeMatch: Set<styleId>,
|
||||||
|
sections: Object<styleId => {
|
||||||
|
id: styleId,
|
||||||
|
enabled: Boolean,
|
||||||
|
code: String
|
||||||
|
}>
|
||||||
|
} */
|
||||||
const cachedStyleForUrl = createCache();
|
const cachedStyleForUrl = createCache();
|
||||||
|
|
||||||
const BAD_MATCHER = {test: () => false};
|
const BAD_MATCHER = {test: () => false};
|
||||||
const compileRe = createCompiler(text => `^(${text})$`);
|
const compileRe = createCompiler(text => `^(${text})$`);
|
||||||
const compileSloppyRe = createCompiler(text => `^${text}$`);
|
const compileSloppyRe = createCompiler(text => `^${text}$`);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user