remove some unused code

pull/924/head
Rich Harris 8 years ago
parent 99a3987aef
commit e4d410c453

@ -10,12 +10,12 @@ export interface BlockOptions {
generator?: DomGenerator;
expression?: Node;
context?: string;
destructuredContexts?: string[];
comment?: string;
key?: string;
contexts?: Map<string, string>;
indexes?: Map<string, string>;
changeableIndexes?: Map<string, boolean>;
contextDependencies?: Map<string, string[]>;
params?: string[];
indexNames?: Map<string, string>;
listNames?: Map<string, string>;
@ -38,7 +38,6 @@ export default class Block {
contexts: Map<string, string>;
indexes: Map<string, string>;
changeableIndexes: Map<string, boolean>;
contextDependencies: Map<string, string[]>;
dependencies: Set<string>;
params: string[];
indexNames: Map<string, string>;
@ -86,7 +85,6 @@ export default class Block {
this.contexts = options.contexts;
this.indexes = options.indexes;
this.changeableIndexes = options.changeableIndexes;
this.contextDependencies = options.contextDependencies;
this.dependencies = new Set();
this.params = options.params;

@ -230,13 +230,9 @@ const preprocessors = {
const changeableIndexes = new Map(block.changeableIndexes);
if (node.index) changeableIndexes.set(node.index, node.key);
const contextDependencies = new Map(block.contextDependencies);
contextDependencies.set(node.context, dependencies);
if (node.destructuredContexts) {
for (const i = 0; i < node.destructuredContexts.length; i++) {
for (let i = 0; i < node.destructuredContexts.length; i += 1) {
contexts.set(node.destructuredContexts[i], `${context}[${i}]`);
contextDependencies.set(node.destructuredContexts[i], dependencies);
}
}
@ -247,7 +243,6 @@ const preprocessors = {
context: node.context,
key: node.key,
contextDependencies,
contexts,
indexes,
changeableIndexes,
@ -524,7 +519,6 @@ export default function preprocess(
contexts: new Map(),
indexes: new Map(),
changeableIndexes: new Map(),
contextDependencies: new Map(),
params: ['state'],
indexNames: new Map(),

Loading…
Cancel
Save