Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TypeScript lint errors #6567

Merged
merged 1 commit into from
May 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/ide-desktop/lib/content-config/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import * as semver from 'semver'

import * as linkedDist from '../../../../../target/ensogl-pack/linked-dist/index'
import * as linkedDist from '../../../../../target/ensogl-pack/linked-dist'
import BUILD_INFO from '../../../build.json' assert { type: 'json' }

// Aliases with the same name as the original.
Expand Down
17 changes: 17 additions & 0 deletions app/ide-desktop/lib/types/modules.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@
*
* This file MUST NOT `export {}` for the modules to be visible to other files. */

declare module '*/build.json' {
interface BuildInfo {
commit: string
version: string
engineVersion: string
name: string
}

const BUILD_INFO: BuildInfo
export default BUILD_INFO
}

declare module '*/ensogl-pack/linked-dist' {
// eslint-disable-next-line no-restricted-syntax
export * from '../../../../lib/rust/ensogl/pack/js/src/runner/index'
}
Comment on lines +17 to +20
Copy link
Member

@wdanilo wdanilo May 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. What does it do and why it is better than the previous version? I'm asking just to understand what is the difference here.
  2. It was working fine earlier without that change. Did it stop working because of some new lints enabled? What are these lints? I'm asking about it as it makes the code extremely verbose here and I'm not sure it gives any benefits to us.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. i have no clue whether this is a proper fix - but the idea is that this removes the dependency on the built module, so we are now pointing at the actual source (which always exists) instead of the built .d.ts
  2. i don't think so - as mentioned elsewhere i think it only happens on clean runners (?!). the issue happens on the typecheck run, so what's happening is, typescript is looking for the type definitions but cannot find them


declare module '*/gui/config.yaml' {
interface Config {
windowAppScopeName: string
Expand Down