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

Typescript 5.6.2 support #406

Open
igortas opened this issue Oct 3, 2024 · 0 comments
Open

Typescript 5.6.2 support #406

igortas opened this issue Oct 3, 2024 · 0 comments

Comments

@igortas
Copy link

igortas commented Oct 3, 2024

Describe the bug

Upgrading to latest 5.6.2 version is not working as expected and gives errors like:

Parameter 'xxx' implicitly has an 'any' type
Property 'xxx' does not exist on type

Reproduction

Install vite and plugin checker on latest version, update the vite.config.ts to be like this:

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
import viteTsconfigPaths from 'vite-tsconfig-paths';
import pluginChecker from 'vite-plugin-checker';

// https://vitejs.dev/config/
export default defineConfig(({ mode }) => ({
	plugins: [
		mode === 'development' ? pluginChecker({ typescript: true }) : null,
		react(),
		viteTsconfigPaths(),
	server: {
		port: 3000,
		open: true
	},
}));

Expected behavior

I expect typescript to compile the files without errors, where I have strong typed variables.

System Info

System:
    OS: Linux 5.15 Ubuntu 24.04 LTS 24.04 LTS (Noble Numbat)
    CPU: (16) x64 12th Gen Intel(R) Core(TM) i7-12650H
    Memory: 16.78 GB / 19.54 GB
    Container: Yes
    Shell: 5.2.21 - /bin/bash
  Binaries:
    Node: 22.6.0 - ~/.nvm/versions/node/v22.6.0/bin/node
    npm: 10.8.3 - ~/.nvm/versions/node/v22.6.0/bin/npm
    pnpm: 9.11.0 - ~/.nvm/versions/node/v22.6.0/bin/pnpm
    bun: 1.1.29 - ~/.bun/bin/bun
  npmPackages:
    vite-plugin-checker: ^0.8.0 => 0.8.0 


### Additional context

{
"compilerOptions": {
/* Base Options: */
"esModuleInterop": true,
"skipLibCheck": true,
"target": "ESNext",
"allowJs": false,
"resolveJsonModule": true,
"moduleDetection": "force",
"isolatedModules": true,

	/* Strictness */
	"strict": true,
	"noUncheckedIndexedAccess": false,
	"allowUnusedLabels": true,
	"allowUnreachableCode": false,
	"exactOptionalPropertyTypes": false,
	"noFallthroughCasesInSwitch": true,
	"noImplicitOverride": true,
	"noPropertyAccessFromIndexSignature": false,
	"noUnusedLocals": false,
	"noUnusedParameters": false,
	"allowSyntheticDefaultImports": true,
	"forceConsistentCasingInFileNames": true,
	"verbatimModuleSyntax": false,
	"noEmit": true,

	/* If transpiling with TypeScript: */
	"module": "ESNext",
	"outDir": "build",
	"sourceMap": true,

	"types": [
		"vite/client"
	],
	"lib": ["dom", "dom.iterable", "esnext"],
	"moduleResolution": "Bundler",
	"jsx": "react-jsx",
	"baseUrl": "./src"
},
"include": ["src"]

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant