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

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

Loading…
Cancel
Save