question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ivy: Debug assert: importing a Reference to non-declaration?

See original GitHub issue

🐞 bug report

Is this a regression?

Yes, worked in non-ivy.

Description

When importing and using a third party file that contains only interfaces/types I get an error when building in production mode. In development mode everything works fine.

Debug assert: importing a Reference to non-declaration?

https://github.com/angular/angular/blob/0b1e34de405891229dab85a0606f3d6bc5efab83/packages/compiler-cli/src/ngtsc/imports/src/emitter.ts#L131

🔬 Minimal Reproduction

I still work on that. I have it in a rather big code base, so this might take some time.

🔥 Exception or Error

ERROR in Error: Debug assert: importing a Reference to non-declaration?
    at AbsoluteModuleStrategy.emit (/Users/marc/bude/deepkit/packages/deepkit/node_modules/@angular/compiler-cli/src/ngtsc/imports/src/emitter.js:117:23)
    at ReferenceEmitter.emit (/Users/marc/bude/deepkit/packages/deepkit/node_modules/@angular/compiler-cli/src/ngtsc/imports/src/emitter.js:42:44)
    at TypeCheckFile.Environment.referenceType (/Users/marc/bude/deepkit/packages/deepkit/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/environment.js:208:42)
    at TypeEmitter.emitReference (/Users/marc/bude/deepkit/packages/deepkit/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/environment.js:216:63)
    at TypeEmitter.emitTypeReference (/Users/marc/bude/deepkit/packages/deepkit/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_emitter.js:117:40)
    at Object.visitTypeReferenceNode (/Users/marc/bude/deepkit/packages/deepkit/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_emitter.js:93:72)
    at visitTypeNode (/Users/marc/bude/deepkit/packages/deepkit/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_emitter.js:130:28)
    at TypeEmitter.emitType (/Users/marc/bude/deepkit/packages/deepkit/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_emitter.js:92:20)
    at /Users/marc/bude/deepkit/packages/deepkit/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_parameter_emitter.js:57:79
    at Array.map (<anonymous>)
    at TypeParameterEmitter.emit (/Users/marc/bude/deepkit/packages/deepkit/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_parameter_emitter.js:56:40)
    at TypeCheckFile.Environment.emitTypeParameters (/Users/marc/bude/deepkit/packages/deepkit/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/environment.js:216:28)
    at TypeCheckFile.Environment.typeCtorFor (/Users/marc/bude/deepkit/packages/deepkit/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/environment.js:93:39)
    at tcbCallTypeCtor (/Users/marc/bude/deepkit/packages/deepkit/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_block.js:1276:32)
    at TcbDirectiveOp.execute (/Users/marc/bude/deepkit/packages/deepkit/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_block.js:332:28)
    at Scope.executeOp (/Users/marc/bude/deepkit/packages/deepkit/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_block.js:884:26)

When I print all the arguments via

console.log('ref', ref, context, importMode);
throw new Error('Debug assert: importing a Reference to non-declaration?');

in that method I get:

ef Reference {
  node: NodeObject {
    pos: 181,
    end: 253,
    flags: 0,
    modifierFlagsCache: 536870913,
    transformFlags: 536870913,
    parent: SourceFileObject {
      pos: 0,
      end: 9926,
      flags: 0,
      modifierFlagsCache: 0,
      transformFlags: 536870913,
      parent: undefined,
      kind: 285,
      text: 'import {JSONEntity} from "./core";\n' +
        'import {CollectionPaginationEvent, CollectionSort, FilterParameters} from "./collection";\n' +
        'import {PropertySchemaSerialized} from "@marcj/marshal";\n' +
        '\n' +
        'export interface IdInterface {\n' +
        '    id: string;\n' +
        '\n' +
        '    version: number;\n' +
        '}\n' +
        '\n' +
        'export interface EntityPatches {\n' +
        '    [path: string]: any;\n' +
        '}\n' +
        '\n' +
        'export interface ExchangeEntityBase {\n' +
        '    id: string;\n' +
        '    version: number;\n' +
        '}\n' +
        '\n' +
        'export interface ExchangeEntityAdd extends ExchangeEntityBase {\n' +
        "    type: 'add';\n" +
        '    item: any;\n' +
        '}\n' +
        '\n' +
        'export interface ExchangeEntityRemove extends ExchangeEntityBase {\n' +
        "    type: 'remove';\n" +
        '}\n' +
        '\n' +
        'export interface ExchangeEntityRemoveMany {\n' +
        "    type: 'removeMany';\n" +
        '    ids: string[];\n' +
        '}\n' +
        '\n' +
        'export interface ExchangeEntityUpdate extends ExchangeEntityBase {\n' +
        "    type: 'update';\n" +
        '    item: any;\n' +
        '}\n' +
        '\n' +
        'export interface ExchangeEntityPatch extends ExchangeEntityBase {\n' +
        "    type: 'patch';\n" +
        '    patch: EntityPatches;\n' +
        '    item: any;\n' +
        '}\n' +
        '\n' +
        'export type ExchangeEntity = ExchangeEntityAdd | ExchangeEntityRemove | ExchangeEntityUpdate | ExchangeEntityPatch | ExchangeEntityRemoveMany;\n' +
        '\n' +
        'export interface ClientPushMessage {\n' +
        "    name: 'push-message/reply';\n" +
        '    replyId: number;\n' +
        '    data: any;\n' +
        '}\n' +
        '\n' +
        'export interface ClientMessageId {\n' +
        '    id: number;\n' +
        '}\n' +
        '\n' +
        'export interface ClientMessagePeerRegisterController {\n' +
        "    name: 'peerController/register';\n" +
        '    controllerName: string;\n' +
        '}\n' +
        '\n' +
        '//from client to peer\n' +
        'export interface ClientMessagePeerMessage {\n' +
        "    name: 'peerController/message';\n" +
        '    controllerName: string;\n' +
        '    clientId: string;\n' +
        '    data: ServerMessageResult;\n' +
        '}\n' +
        '\n' +
        'export interface ClientMessagePeerEndMessage {\n' +
        "    name: 'peerUser/end';\n" +
        '}\n' +
        '\n' +
        'export interface ClientMessagePeerUnRegisterController {\n' +
        "    name: 'peerController/unregister';\n" +
        '    controllerName: string;\n' +
        '}\n' +
        '\n' +
        'export interface ClientMessageActionTypes {\n' +
        "    name: 'actionTypes';\n" +
        '    controller: string;\n' +
        '    action: string;\n' +
        '    timeout: number;\n' +
        '}\n' +
        '\n' +
        'export interface ClientMessageAuthorize {\n' +
        "    name: 'authenticate';\n" +
        '    token: any;\n' +
        '}\n' +
        '\n' +
        'export interface ClientMessageAction {\n' +
        "    name: 'action';\n" +
        '    controller: string;\n' +
        '    action: string;\n' +
        '    args: any[];\n' +
        '    timeout: number;\n' +
        '}\n' +
        '\n' +
        'export interface ClientPeerMessageAction {\n' +
        "    name: 'peerMessage';\n" +
        '    controller: string;\n' +
        '    message: any;\n' +
        '    timeout: number;\n' +
        '}\n' +
        '\n' +
        'export interface ClientMessageEntityUnsubscribe {\n' +
        "    name: 'entity/unsubscribe';\n" +
        '    forId: number;\n' +
        '}\n' +
        '\n' +
        'export interface ClientMessageSubjectUnsubscribe {\n' +
        "    name: 'subject/unsubscribe';\n" +
        '    forId: number;\n' +
        '}\n' +
        '\n' +
        'export interface ClientMessageCollectionUnsubscribe {\n' +
        "    name: 'collection/unsubscribe';\n" +
        '    forId: number;\n' +
        '}\n' +
        '\n' +
        'export interface ClientMessageCollectionPagination {\n' +
        "    name: 'collection/pagination';\n" +
        '    forId: number;\n' +
        '    page: number;\n' +
        '    itemsPerPage: number;\n' +
        '    parameters: FilterParameters;\n' +
        "    sort: {field: string, direction: 'asc' | 'desc'}[];\n" +
        '}\n' +
        '\n' +
        'export interface ClientMessageObservableSubscribe {\n' +
        "    name: 'observable/subscribe';\n" +
        '    forId: number;\n' +
        '    subscribeId: number;\n' +
        '}\n' +
        '\n' +
        'export interface ClientMessageObservableUnsubscribe {\n' +
        "    name: 'observable/unsubscribe';\n" +
        '    forId: number;\n' +
        '    subscribeId: number;\n' +
        '}\n' +
        '\n' +
        'export type ClientMessageWithoutId = ClientPushMessage\n' +
        '    | ClientMessagePeerUnRegisterController\n' +
        '    | ClientMessagePeerRegisterController\n' +
        '    | ClientMessageCollectionPagination\n' +
        '    | ClientMessagePeerMessage\n' +
        '    | ClientMessagePeerEndMessage\n' +
        '    | ClientMessageActionTypes\n' +
        '    | ClientMessageAuthorize\n' +
        '    | ClientMessageAction\n' +
        '    | ClientMessageEntityUnsubscribe\n' +
        '    | ClientMessageObservableSubscribe\n' +
        '    | ClientMessageObservableUnsubscribe\n' +
        '    | ClientMessageCollectionUnsubscribe\n' +
        '    | ClientMessageSubjectUnsubscribe\n' +
        '    | ClientPeerMessageAction;\n' +
        '\n' +
        'export type ClientMessageAll = (ClientMessageWithoutId & ClientMessageId);\n' +
        '\n' +
        'export interface MessageEntityBase {\n' +
        '    entityName: string;\n' +
        '    id: string;\n' +
        '    version: number;\n' +
        '}\n' +
        '\n' +
        'export interface ServerMessageEntityRemove extends MessageEntityBase {\n' +
        "    type: 'entity/remove';\n" +
        '}\n' +
        '\n' +
        'export interface ServerMessageEntityRemoveMany {\n' +
        '    entityName: string;\n' +
        "    type: 'entity/removeMany';\n" +
        '    ids: string[];\n' +
        '}\n' +
        '\n' +
        'export interface ServerMessageEntityUpdate extends MessageEntityBase {\n' +
        "    type: 'entity/update';\n" +
        '    data: any;\n' +
        '}\n' +
        '\n' +
        'export interface ServerMessageEntityPatch extends MessageEntityBase {\n' +
        "    type: 'entity/patch';\n" +
        '    patch: EntityPatches;\n' +
        '}\n' +
        '\n' +
        'export type ServerMessageEntity = ServerMessageEntityRemove | ServerMessageEntityRemoveMany | ServerMessageEntityUpdate | ServerMessageEntityPatch;\n' +
        '\n' +
        'export interface CollectionStreamSet {\n' +
        "    type: 'set';\n" +
        '    items: IdInterface[];\n' +
        '    total: number;\n' +
        '}\n' +
        '\n' +
        'export interface CollectionStreamSort {\n' +
        "    type: 'sort';\n" +
        '    ids: string[];\n' +
        '}\n' +
        '\n' +
        'export interface CollectionStreamAdd {\n' +
        "    type: 'add';\n" +
        '    item: IdInterface;\n' +
        '}\n' +
        '\n' +
        'export interface CollectionStreamBatchStart {\n' +
        "    type: 'batch/start';\n" +
        '}\n' +
        '\n' +
        'export interface CollectionStreamBatchEnd {\n' +
        "    type: 'batch/end';\n" +
        '}\n' +
        '\n' +
        'export interface CollectionStreamReady {\n' +
        "    type: 'ready';\n" +
        '}\n' +
        '\n' +
        'export interface CollectionStreamRemove {\n' +
        "    type: 'remove';\n" +
        '    id: string;\n' +
        '}\n' +
        '\n' +
        'export interface CollectionStreamRemoveMany {\n' +
        "    type: 'removeMany';\n" +
        '    ids: string[];\n' +
        '}\n' +
        '\n' +
        'export interface StreamFileSet {\n' +
        "    type: 'set';\n" +
        '    path: string;\n' +
        '    version: number;\n' +
        '}\n' +
        '\n' +
        'export interface StreamFileAppend {\n' +
        "    type: 'append';\n" +
        '    path: string;\n' +
        '    version: number;\n' +
        '    content: any;\n' +
        '    size: number;\n' +
        '}\n' +
        '\n' +
        'export interface StreamFileRemove {\n' +
        "    type: 'remove';\n" +
        '    path: string;\n' +
        '}\n' +
        '\n' +
        'export interface CollectionStreamPagination {\n' +
        "    type: 'pagination';\n" +
        '    event: CollectionPaginationEvent;\n' +
        '}\n' +
        '\n' +
        'export type CollectionStream =\n' +
        '    CollectionStreamBatchStart\n' +
        '    | CollectionStreamBatchEnd\n' +
        '    | CollectionStreamPagination\n' +
        '    | CollectionStreamSet\n' +
        '    | CollectionStreamSort\n' +
        '    | CollectionStreamAdd\n' +
        '    | CollectionStreamRemove\n' +
        '    | CollectionStreamRemoveMany\n' +
        '    | CollectionStreamReady;\n' +
        '\n' +
        'export type StreamFileResult = StreamFileSet | StreamFileAppend | StreamFileRemove;\n' +
        '\n' +
        'export interface ServerMessageTypeJson {\n' +
        "    type: 'type';\n" +
        '    id: number;\n' +
        "    returnType: 'json';\n" +
        '}\n' +
        '\n' +
        'export interface ServerMessageTypeCollection {\n' +
        "    type: 'type';\n" +
        '    id: number;\n' +
        "    returnType: 'collection';\n" +
        '    pagination: {\n' +
        '        active: boolean,\n' +
        '        itemsPerPage: number,\n' +
        '        page: number,\n' +
        '        total: number,\n' +
        '        sort: CollectionSort[],\n' +
        '        parameters: FilterParameters,\n' +
        '    };\n' +
        '    entityName: string;\n' +
        '}\n' +
        '\n' +
        'export interface ServerMessageTypeObservable {\n' +
        "    type: 'type';\n" +
        "    returnType: 'observable';\n" +
        '    id: number;\n' +
        '}\n' +
        '\n' +
        'export interface ServerMessageTypeEntity<T extends IdInterface> {\n' +
        "    type: 'type';\n" +
        "    returnType: 'entity';\n" +
        '    id: number;\n' +
        '    entityName?: string;\n' +
        '    item?: JSONEntity<T>;\n' +
        '}\n' +
        '\n' +
        'export interface ServerMessageTypeSubject {\n' +
        "    type: 'type';\n" +
        "    returnType: 'subject';\n" +
        '    id: number;\n' +
        '    encoding: PropertySchemaSerialized;\n' +
        '    data: any;\n' +
        '}\n' +
        '\n' +
        'export type ServerMessageType = ServerMessageTypeJson | ServerMessageTypeCollection | ServerMessageTypeObservable\n' +
        '    | ServerMessageTypeEntity<IdInterface> | ServerMessageTypeSubject;\n' +
        '\n' +
        'export interface ServerMessageNextJson {\n' +
        "    type: 'next/json';\n" +
        '    id: number;\n' +
        '    encoding: PropertySchemaSerialized;\n' +
        '    next: any;\n' +
        '}\n' +
        '\n' +
        'export interface ServerPushMessageMessage {\n' +
        "    type: 'push-message';\n" +
        '    replyId: number;\n' +
        '    next: any;\n' +
        '}\n' +
        '\n' +
        'export interface ServerMessageNextObservable {\n' +
        "    type: 'next/observable';\n" +
        '    id: number;\n' +
        '    encoding: PropertySchemaSerialized;\n' +
        '    next: any;\n' +
        '    subscribeId: number;\n' +
        '}\n' +
        '\n' +
        'export interface ServerMessageNextSubject {\n' +
        "    type: 'next/subject';\n" +
        '    id: number;\n' +
        '    encoding: PropertySchemaSerialized;\n' +
        '    next: any;\n' +
        '}\n' +
        '\n' +
        'export interface ServerMessageAppendSubject {\n' +
        "    type: 'append/subject';\n" +
        '    id: number;\n' +
        '    encoding: PropertySchemaSerialized;\n' +
        '    append: any;\n' +
        '}\n' +
        '\n' +
        'export interface ServerMessageNextCollection {\n' +
        "    type: 'next/collection';\n" +
        '    id: number;\n' +
        '    next: CollectionStream;\n' +
        '}\n' +
        '\n' +
        'export type ServerMessageNext = ServerPushMessageMessage\n' +
        '    | ServerMessageNextJson\n' +
        '    | ServerMessageNextObservable\n' +
        '    | ServerMessageNextCollection\n' +
        '    | ServerMessageNextSubject\n' +
        '    | ServerMessageAppendSubject;\n' +
        '\n' +
        'export interface ServerMessageAck {\n' +
        "    type: 'ack';\n" +
        '    id: number;\n' +
        '}\n' +
        '\n' +
        'export interface ServerMessageCompleteGeneral {\n' +
        "    type: 'complete';\n" +
        '    id: number;\n' +
        '}\n' +
        '\n' +
        'export interface ServerMessageCompleteObservable {\n' +
        "    type: 'complete/observable';\n" +
        '    id: number;\n' +
        '    subscribeId: number;\n' +
        '}\n' +
        '\n' +
        'export type ServerMessageComplete = ServerMessageAck | ServerMessageCompleteGeneral | ServerMessageCompleteObservable;\n' +
        '\n' +
        'export interface ServerMessageErrorGeneral {\n' +
        "    type: 'error';\n" +
        '    id: number;\n' +
        '    error: any;\n' +
        '    stack: any;\n' +
        "    entityName: string | '@error:default';\n" +
        '    code?: string;\n' +
        '}\n' +
        '\n' +
        'export interface ServerMessageErrorObservable {\n' +
        "    type: 'error/observable';\n" +
        '    id: number;\n' +
        '    error: any;\n' +
        '    stack: any;\n' +
        "    entityName: string | '@error:default';\n" +
        '    subscribeId: number;\n' +
        '}\n' +
        '\n' +
        'export type ServerMessageError = ServerMessageErrorGeneral | ServerMessageErrorObservable;\n' +
        '\n' +
        'export interface ServerMessageAuthorize {\n' +
        "    type: 'authenticate/result';\n" +
        '    id: number;\n' +
        '    result: boolean;\n' +
        '}\n' +
        '\n' +
        "export type ServerMessageActionTypeNames = 'Entity' | 'Object' | 'Any' | 'Plain' | 'String' | 'Date' | 'Number' | 'Boolean' | 'undefined';\n" +
        '\n' +
        'export interface ServerMessageActionTypes {\n' +
        "    type: 'actionTypes/result';\n" +
        '    id: number;\n' +
        '    parameters: PropertySchemaSerialized[];\n' +
        '}\n' +
        '\n' +
        'export type ServerMessageResult = ServerMessageActionTypes | ServerMessageAuthorize | ServerMessageType\n' +
        '    | ServerMessageNext | ServerMessageComplete | ServerMessageError;\n' +
        '\n' +
        'export interface ServerMessageChannel {\n' +
        "    type: 'channel';\n" +
        '    name: string;\n' +
        '    data: any;\n' +
        '}\n' +
        '\n' +
        '/**\n' +
        ' * A peer message, from server to client wrapping a message sent from\n' +
        ' * the peer controller.\n' +
        ' */\n' +
        'export interface ServerMessagePeerChannelMessage {\n' +
        '    id: number;\n' +
        "    type: 'peerController/message';\n" +
        '    clientId: string;\n' +
        '    data: ClientMessageAll;\n' +
        '}\n' +
        '\n' +
        '\n' +
        'export type ServerMessageAll = ServerMessageResult | ServerMessagePeerChannelMessage | ServerMessageChannel | ServerMessageEntity;\n',
      bindDiagnostics: [],
      bindSuggestionDiagnostics: undefined,
      languageVersion: 4,
      fileName: '/Users/marc/bude/deepkit/packages/deepkit/node_modules/@marcj/glut-core/src/contract.ts',
      languageVariant: 0,
      isDeclarationFile: false,
      scriptKind: 3,
      pragmas: Map {},
      checkJsDirective: undefined,
      referencedFiles: [],
      typeReferenceDirectives: [],
      libReferenceDirectives: [],
      amdDependencies: [],
      hasNoDefaultLib: false,
      statements: [Array],
      endOfFileToken: [TokenObject],
      externalModuleIndicator: [NodeObject],
      nodeCount: 1085,
      identifierCount: 354,
      identifiers: [Map],
      parseDiagnostics: [],
      path: '/Users/marc/bude/deepkit/packages/deepkit/node_modules/@marcj/glut-core/src/contract.ts',
      resolvedPath: '/Users/marc/bude/deepkit/packages/deepkit/node_modules/@marcj/glut-core/src/contract.ts',
      originalFileName: '/Users/marc/bude/deepkit/packages/deepkit/node_modules/@marcj/glut-core/src/contract.ts',
      imports: [Array],
      moduleAugmentations: [],
      ambientModuleNames: [],
      resolvedModules: [Map],
      symbol: [SymbolObject],
      locals: [Map],
      nextContainer: [Circular],
      symbolCount: 340,
      classifiableNames: [Map],
      id: 39647
    },
    kind: 242,
    decorators: undefined,
    modifiers: [ [TokenObject], pos: 181, end: 189, transformFlags: 536870912 ],
    name: IdentifierObject {
      pos: 199,
      end: 211,
      flags: 0,
      modifierFlagsCache: 0,
      transformFlags: 536870912,
      parent: [Circular],
      escapedText: 'IdInterface',
      flowNode: [Object]
    },
    typeParameters: undefined,
    heritageClauses: undefined,
    members: [
      [NodeObject],
      [NodeObject],
      pos: 213,
      end: 251,
      transformFlags: 536870913
    ],
    symbol: SymbolObject {
      flags: 64,
      escapedName: 'IdInterface',
      declarations: [Array],
      members: [Map],
      parent: [SymbolObject],
      id: 40981,
      isReferenced: 788968
    },
    localSymbol: SymbolObject {
      flags: 0,
      escapedName: 'IdInterface',
      declarations: [Array],
      parent: undefined,
      exportSymbol: [SymbolObject]
    },
    nextContainer: NodeObject {
      pos: 253,
      end: 314,
      flags: 0,
      modifierFlagsCache: 536870913,
      transformFlags: 536870913,
      parent: [SourceFileObject],
      kind: 242,
      decorators: undefined,
      modifiers: [Array],
      name: [IdentifierObject],
      typeParameters: undefined,
      heritageClauses: undefined,
      members: [Array],
      symbol: [SymbolObject],
      localSymbol: [SymbolObject],
      nextContainer: [NodeObject]
    }
  },
  identifiers: [
    IdentifierObject {
      pos: 199,
      end: 211,
      flags: 0,
      modifierFlagsCache: 0,
      transformFlags: 536870912,
      parent: [NodeObject],
      escapedText: 'IdInterface',
      flowNode: [Object]
    }
  ],
  synthetic: false,
  _alias: null,
  bestGuessOwningModule: {
    specifier: '@marcj/glut-core',
    resolutionContext: '/Users/marc/bude/deepkit/packages/deepkit/src/app/components/SimpleTableComponent.ts'
  }
} SourceFileObject {
  pos: 0,
  end: 0,
  flags: 0,
  modifierFlagsCache: 0,
  transformFlags: 0,
  parent: undefined,
  kind: 285,
  text: '',
  bindDiagnostics: [],
  bindSuggestionDiagnostics: undefined,
  languageVersion: 99,
  fileName: '/Users/marc/bude/deepkit/packages/deepkit/src/__ng_typecheck__.ts',
  languageVariant: 0,
  isDeclarationFile: false,
  scriptKind: 3,
  pragmas: Map {},
  checkJsDirective: undefined,
  referencedFiles: [],
  typeReferenceDirectives: [],
  libReferenceDirectives: [],
  amdDependencies: [],
  hasNoDefaultLib: false,
  statements: [ pos: 0, end: 0 ],
  endOfFileToken: TokenObject {
    pos: 0,
    end: 0,
    flags: 0,
    modifierFlagsCache: 0,
    transformFlags: 0,
    parent: [Circular],
    kind: 1
  },
  externalModuleIndicator: undefined,
  nodeCount: 2,
 92      * name of the targeted declaration, as it might be different from the declared name (e.g. a
  identifierCount: 0,
  identifiers: Map {},
  parseDiagnostics: []
} 0

As we can see the IdInterface is a interface only. This is used in following component like so:


import {
    Collection,
    IdInterface,
} from '@marcj/glut-core';

export class SimpleTableComponent<T extends IdInterface> implements AfterViewInit, OnChanges, OnDestroy {
    @Input() public items!: T[] | Collection<T>;

   //snap
}

🌍 Your Environment

Angular CLI: 9.0.0-rc.8
Node: 12.14.1
OS: darwin x64

Angular: 9.0.0-rc.9
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.0-rc.8
@angular-devkit/build-angular     0.900.0-rc.8
@angular-devkit/build-optimizer   0.900.0-rc.8
@angular-devkit/build-webpack     0.900.0-rc.8
@angular-devkit/core              9.0.0-rc.8
@angular-devkit/schematics        9.0.0-rc.8
@angular/cdk                      9.0.0-rc.7
@angular/cli                      9.0.0-rc.8
@angular/http                     7.2.15
@ngtools/webpack                  9.0.0-rc.8
@schematics/angular               9.0.0-rc.8
@schematics/update                0.900.0-rc.8
rxjs                              6.5.3
typescript                        3.6.4
webpack                           4.41.2

Anything else relevant?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
JoostKcommented, Jan 18, 2020

To workaround the issue you could change the SimpleTableComponent as follows:

export type IdInterface_Ng34837 = IdInterface;
export class SimpleTableComponent<T extends IdInterface_Ng34837 >

Introducing the local type alias prevents the type emitter from kicking in, avoiding the issue.

0reactions
angular-automatic-lock-bot[bot]commented, Mar 7, 2020

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

FAQ | Apache Ivy ™
FAQ. What and Why. What is Apache Ivy™ ? Apache Ivy™ is a powerful dependencies manager with transitive dependencies support and much more...
Read more >
Ivy debug message level within Eclipse - java - Stack Overflow
Message level can be changed when running Ivy as a standalone program by adding "-verbose" or "-debug" args. ex: java -jar ivy.jar -verbose....
Read more >
Viewing online file analysis results for 'MSG_458954.vbs'
Executes a visual basic script. details: Process "wscript.exe" with commandline ""C:\MSG_458954.vbs"" (Show Process); source · Loads the task scheduler COM API.
Read more >
Tinylisp Reference Manual 15 February 1989
The Ivy text editor uses Tinylisp to implement its predefined ... A symbol X. Y can be imported into some other module M,...
Read more >
wordlist.txt
... assentor assents asser assert assertable assertative asserted asserter ... cistvaen cit citable citadel citadels cital citation citational citations ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found