MCPcopy Index your code
hub / github.com/coder/coder / withDefaultFeatures

Function withDefaultFeatures

site/src/api/api.ts:233–249  ·  view source on GitHub ↗
(
	fs: Partial<TypesGen.Entitlements["features"]>,
)

Source from the content-addressed store, hash-verified

231// withDefaultFeatures sets all unspecified features to not_entitled and
232// disabled.
233export const withDefaultFeatures = (
234 fs: Partial<TypesGen.Entitlements["features"]>,
235): TypesGen.Entitlements["features"] => {
236 for (const feature of TypesGen.FeatureNames) {
237 // Skip fields that are already filled.
238 if (fs[feature] !== undefined) {
239 continue;
240 }
241
242 fs[feature] = {
243 enabled: false,
244 entitlement: "not_entitled",
245 };
246 }
247
248 return fs as TypesGen.Entitlements["features"];
249};
250
251type WatchBuildLogsByTemplateVersionIdOptions = {
252 after?: number;

Callers 4

withDashboardProviderFunction · 0.90
entities.tsFile · 0.90
ApiMethodsClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected