MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / kyUse

Function kyUse

__tests__/js-instance-receiver-static-methods.test.ts:50–53  ·  view source on GitHub ↗
(receiver: string)

Source from the content-addressed store, hash-verified

48 'export type KyInstance = {\n\tcreate: (defaults?: object) => KyInstance;\n};\n\n' +
49 'declare function createInstance(): KyInstance;\n\nconst ky = createInstance();\nexport default ky;\n';
50const kyUse = (receiver: string): string =>
51 `import ${receiver} from 'ky';\n\n` +
52 `export function selfImport() {\n\treturn ${receiver}.create({});\n}\n\n` +
53 `export async function dynamicImport() {\n\tconst {default: ${receiver}} = await import('./index.js');\n\treturn ${receiver}.create({});\n}\n`;
54
55describe('a value named like a class, and that class\'s static method (#3429)', () => {
56 it('does not link the call to the static method', async () => {

Calls

no outgoing calls

Tested by

no test coverage detected