If you take a simple plugin like this:
import Plugin from '@jbrowse/core/Plugin'
import PluginManager from '@jbrowse/core/PluginManager'
import {
type AbstractSessionModel,
isAbstractMenuManager,
} from '@jbrowse/core/util'
export default class ApolloIntroPlugin extends Plugin {
name = 'ApolloIntroPlugin'
configure(pluginManager: PluginManager) {
if (isAbstractMenuManager(pluginManager.rootModel)) {
pluginManager.rootModel.appendToMenu('Add', {
label: 'Widget',
onClick: (session: AbstractSessionModel) => {
const { assemblyManager } = session
const assembly = assemblyManager.get('assemblyName')
console.log(assembly)
},
})
}
}
}
And run a type-aware lint on it, you get output like this:
/path/to/plugin/src/index.ts
18:17 error Unsafe assignment of an error typed value @typescript-eslint/no-unsafe-assignment
✖ 1 problem (1 error, 0 warnings)
And if you hover over assembly in an editor, it shows the type as any.
What's odd is this error does not appear in the current main branch of Apollo, but when I try to reproduce it outside of the Apollo repository, I always get the error, no matter how much I try to match the dependency versions. And when I upgrade @jbrowse/core in the Apollo repository, this same error appears.
Reproducible repo at: https://github.com/garrettjstevens/jbrowse-plugin-5568-repro
If you take a simple plugin like this:
And run a type-aware lint on it, you get output like this:
And if you hover over
assemblyin an editor, it shows the type asany.What's odd is this error does not appear in the current main branch of Apollo, but when I try to reproduce it outside of the Apollo repository, I always get the error, no matter how much I try to match the dependency versions. And when I upgrade
@jbrowse/corein the Apollo repository, this same error appears.Reproducible repo at: https://github.com/garrettjstevens/jbrowse-plugin-5568-repro