MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / getModuleBinding

Function getModuleBinding

packages/vite/hmr/server/websocket.ts:154–166  ·  view source on GitHub ↗
(canonical: string)

Source from the content-addressed store, hash-verified

152 const modules = new Map<string, NativeScriptImportBinding>();
153
154 const getModuleBinding = (canonical: string) => {
155 let entry = modules.get(canonical);
156 if (!entry) {
157 entry = {
158 default: new Set<string>(),
159 namespace: new Set<string>(),
160 named: [],
161 sideEffectOnly: false,
162 };
163 modules.set(canonical, entry);
164 }
165 return entry;
166 };
167
168 const parseNamedImports = (clause: string, binding: NativeScriptImportBinding) => {
169 const inner = clause.replace(/^\{/, '').replace(/\}$/, '');

Callers 1

Calls 2

getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected