Skip to content

💥 Type exports for ContextT, LogDNABrowserOptionsT, ILogDNABrowserLogger (and others) broken #7

@prescience-data

Description

@prescience-data

Problem

Cannot get visibility on exported types.

Cause

I believe something is getting mangled during Rollup.

This is your dist/types/index.d.ts file, which appears to circularly reference itself on line 1, and does not export the types it is looking for.

However, those types are exported from src/index.d.ts (as seen in the screenshot), thus my inference that something must be occurring during Rollup.

import { ContextT, LogDNABrowserOptionsT, ILogDNABrowserLogger } from './index.d';
declare class LogDNABrowserLogger implements ILogDNABrowserLogger {
    Plugins: {
        PerformanceMeasurePlugin: typeof import("./plugins/performance-measure").default;
    };
    private context;
    private logger?;
    private sessionManager;
    private sampleRateScore;
    private staticContext;
    private plugins;
    private options;
    init(ingestionKey: string, options?: LogDNABrowserOptionsT): LogDNABrowserLogger;
    addContext(context: ContextT): LogDNABrowserLogger;
    setSessionId(sessionId: string): LogDNABrowserLogger;
    clearContext(): void;
    error(message: any, lineContext?: object): void;
    warn(message: any, lineContext?: object): void;
    debug(message: any, lineContext?: object): void;
    info(message: any, lineContext?: object): void;
    log(message: any, lineContext?: object): void;
    captureError(error: Error | ErrorEvent, lineContext?: object): void;
    registerMethod(name: string, fn: Function): void;
    private formatMessageForDebug;
    private registerDefaultPlugins;
    private registerPlugin;
    private registerPlugins;
    private logLines;
    private getStackTrace;
    /**
     * Fetches information about the context that is unlikely to change during the session (ex. browser)
     */
    private getStaticContext;
    /**
     * Fetches information about the context that is likely to change during the session (ex. window location)
     */
    private getDynamicContext;
}
declare const _default: LogDNABrowserLogger;
export default _default;

Error

TS2614: Module '"../../node_modules/@logdna/browser/dist/types"' has no exported member 'LogDNABrowserOptionsT'.

Screenshot

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions