Type Alias Opportunity
type Opportunity = {
avoided: Cost;
futureViews?: number;
id: string;
kind: "layout" | "template" | "asset" | "route" | "expansion";
maintain?: Cost;
provision: Cost;
reuse?: number;
}
avoided: Cost;
futureViews?: number;
id: string;
kind: "layout" | "template" | "asset" | "route" | "expansion";
maintain?: Cost;
provision: Cost;
reuse?: number;
}
Properties
avoided
what each view served from it keeps off the wire
Optionalfuture Views
futureViews?: number
overrides ProvisionPrior.futureViews
id
id: string
kind
kind: "layout" | "template" | "asset" | "route" | "expansion"
layout, template and asset are shared by many pages; route is a page the server calls hot; expansion is a page the user has not asked for yet
Optionalmaintain
what keeping it current costs over its life; none when omitted
provision
what fetching it costs, once
Optionalreuse
reuse?: number
overrides ProvisionPrior.reuse
something the worker could fetch ahead of the visit that needs it