-
Apologies if I'm missing something obvious here - I've never quite managed to get my head around configuring Typescript correctly! I am unable to get
Full tsc output$ npx tsc -p . node_modules/@types/vscode/index.d.ts:17:1 - error TS6200: Definitions of the following identifiers conflict with those in another file: version, Position, Range, Selection, Keyboard, Mouse, Command, Line, Block, Underline, LineThin, BlockOutline, UnderlineThin, Off, On, Relative, Default, InCenter, InCenterIfOutsideViewport, AtTop, Left, Center, Right, Full, OpenOpen, ClosedClosed, OpenClosed, ClosedOpen, ThemeColor, ThemeIcon, LF, CRLF, Uri, CancellationTokenSource, CancellationError, Disposable, EventEmitter, Separator, Info, Warning, Error, RelativePattern, GlobPattern, DocumentSelector, ProviderResult, CodeActionKind, Invoke, Automatic, CodeAction, CodeLens, DefinitionLink, Definition, Declaration, MarkdownString, MarkedString, Hover, EvaluatableExpression, InlineValueText, InlineValueVariableLookup, InlineValueEvaluatableExpression, InlineValue, Text, Read, Write, DocumentHighlight, File, Module, Namespace, Package, Class, Method, Property, Field, Constructor, Enum, Interface, Function, Variable, Constant, String, Number, Boolean, Array, Object, Key, Null, EnumMember, Struct, Event, Operator, TypeParameter, Deprecated, SymbolInformation, DocumentSymbol, TextEdit, SnippetTextEdit, NotebookEdit, WorkspaceEdit, SnippetString, SemanticTokensLegend, SemanticTokensBuilder, SemanticTokens, SemanticTokensEdits, SemanticTokensEdit, ParameterInformation, SignatureInformation, SignatureHelp, TriggerCharacter, ContentChange, Unit, Value, Keyword, Snippet, Color, Reference, Folder, User, Issue, CompletionItem, CompletionList, TriggerForIncompleteCompletions, InlineCompletionList, InlineCompletionItem, DocumentLink, ColorInformation, ColorPresentation, Type, Parameter, InlayHintLabelPart, InlayHint, FoldingRange, Comment, Imports, Region, SelectionRange, CallHierarchyItem, CallHierarchyIncomingCall, CallHierarchyOutgoingCall, TypeHierarchyItem, LinkedEditingRanges, DocumentDropEdit, CharacterPair, None, Indent, IndentOutdent, Outdent, Global, Workspace, WorkspaceFolder, Location, Information, Hint, DiagnosticRelatedInformation, Unnecessary, Diagnostic, Active, Beside, One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Panel, Editor, TerminalLink, TerminalProfile, FileDecoration, UI, Production, Development, Test, Light, Dark, HighContrast, HighContrastLight, Always, Silent, Never, Shared, Dedicated, New, TaskGroup, ProcessExecution, Escape, Strong, Weak, ShellExecution, CustomExecution, Task, taskExecutions, onDidStartTask, onDidEndTask, onDidStartTaskProcess, onDidEndTaskProcess, Unknown, Directory, SymbolicLink, Readonly, FileSystemError, Changed, Created, Deleted, Desktop, Web, Trace, Debug, appName, appRoot, appHost, uriScheme, language, clipboard, machineId, sessionId, isNewAppInstall, isTelemetryEnabled, onDidChangeTelemetryEnabled, remoteName, shell, uiKind, logLevel, onDidChangeLogLevel, tabGroups, activeTextEditor, visibleTextEditors, onDidChangeActiveTextEditor, onDidChangeVisibleTextEditors, onDidChangeTextEditorSelection, onDidChangeTextEditorVisibleRanges, onDidChangeTextEditorOptions, onDidChangeTextEditorViewColumn, visibleNotebookEditors, onDidChangeVisibleNotebookEditors, activeNotebookEditor, onDidChangeActiveNotebookEditor, onDidChangeNotebookEditorSelection, onDidChangeNotebookEditorVisibleRanges, terminals, activeTerminal, onDidChangeActiveTerminal, onDidOpenTerminal, onDidCloseTerminal, onDidChangeTerminalState, state, onDidChangeWindowState, activeColorTheme, onDidChangeActiveColorTheme, DataTransferItem, DataTransfer, TreeItem, Collapsed, Expanded, Shutdown, Process, Extension, Replace, Append, Prepend, SourceControl, Window, Notification, QuickInputButtons, Undo, Redo, Manual, AfterDelay, FocusOut, fs, rootPath, workspaceFolders, name, workspaceFile, onDidChangeWorkspaceFolders, textDocuments, onDidOpenTextDocument, onDidCloseTextDocument, onDidChangeTextDocument, onWillSaveTextDocument, onDidSaveTextDocument, notebookDocuments, onDidChangeNotebookDocument, onWillSaveNotebookDocument, onDidSaveNotebookDocument, onDidOpenNotebookDocument, onDidCloseNotebookDocument, onWillCreateFiles, onDidCreateFiles, onWillDeleteFiles, onDidDeleteFiles, onWillRenameFiles, onDidRenameFiles, onDidChangeConfiguration, isTrusted, onDidGrantWorkspaceTrust, ConfigurationScope, onDidChangeDiagnostics, Markup, Code, NotebookRange, NotebookCellOutputItem, NotebookCellOutput, NotebookCellData, NotebookData, Preferred, NotebookCellStatusBarItem, inputBox, DebugAdapterExecutable, DebugAdapterServer, DebugAdapterNamedPipeServer, DebugAdapterInlineImplementation, DebugAdapterDescriptor, Breakpoint, SourceBreakpoint, FunctionBreakpoint, Separate, MergeWithParent, Initial, Dynamic, activeDebugSession, activeDebugConsole, breakpoints, onDidChangeActiveDebugSession, onDidStartDebugSession, onDidReceiveDebugSessionCustomEvent, onDidTerminateDebugSession, onDidChangeBreakpoints, all, onDidChange, Editing, Preview, Unresolved, Resolved, onDidChangeSessions, bundle, uri, Run, Coverage, TestTag, TestRunRequest, TestMessage, TabInputText, TabInputTextDiff, TabInputCustom, TabInputWebview, TabInputNotebook, TabInputNotebookDiff, TabInputTerminal, TelemetryTrustedValue However when I use my webpack config everything compiles with no issue 🤷♂️ I assumed that my My tsconfig.json{ "compilerOptions": { "module": "commonjs", "target": "ES2020", "lib": [ "ES2020" ], "sourceMap": true, "rootDir": "src", "outDir": "dist", "strict": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "noUnusedParameters": true }, "exclude": [ "node_modules", ] } My webpack config if that helps at all?//@ts-check Any advice would be greatly appreciated! :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Looking at this again, it appears that the conflicts are beacuse I have Adding the following to my {
"compilerOptions": {
"module": "commonjs",
"target": "ES2020",
+ "baseUrl": ".",
+ "paths": {
+ "vscode": [
+ "node_modules/@types/vscode"
+ ]
+ },
"lib": [
"ES2020"
],
"sourceMap": true,
"rootDir": "src",
"outDir": "dist",
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noUnusedParameters": true
},
"exclude": [
"node_modules/",
]
}
|
Beta Was this translation helpful? Give feedback.
Looking at this again, it appears that the conflicts are beacuse I have
@types/vscode 1.78.0
installed, but the@vscode/python-extension
package bundles@types/vscode 1.80.0
.Adding the following to my
tsconfig.json
appears to resolve the issue