Open joyceerhl opened 1 year ago
went through all of mine and cleaned up a couple... but some I left in because they could, in theory, be used in the future (i.e. an interface of a parameter that gets passed in)
FYI I see many of these are correctly exported interfaces, while they are not referenced directly outside, they are referenced in other symbols that are exported.
Checked and cleaned up those assigned to me
@rebornix and I were wondering if there is any dead code in the VS Code codebase, and one idea was to detect unused exports across the codebase, since unused variables are flagged by the compiler but unused exports are not.
I ran
ts-unused-exports
on our sources and generated the following list. I've already done a pass to remove some false positives but apologies if several remain.NB: The primary purpose of this issue is to identify unused functions and classes which aren't being picked up by the compiler because they're exported and which can be safely deleted from our sources to reduce our bundle size. A secondary benefit is to remove unused types and interfaces, e.g. anything which was exported at one point and then ceased to be referenced from other files (which more impacts compile time for dev workflows and pipeline runs, and maybe TS server analysis time, but has no direct impact on bundle size since types are erased).
If you export a type or interface that is not currently actively imported, but is used in the public API of a class that you expose, then it's quite likely that you want to keep that type/interface exported and need not un-export it as part of this issue.
Please feel free to remove your assignment if you find that this isn't valuable.
IButtonWithDropdownOptions
PartMatches
Matches
defaultStyles
ExtractErrorType
IInspectValue
IPolicy
IConfigurationDefaultOverride
reportTelemetry
isIExtensionIdentifier
IGalleryExtensionIdentifier
PreferencesLabel
isAlpineLinux
WEB_EXTENSION_RESOURCE_END_POINT
ICommand
IConfigurationProperty
IDebugger
IGrammar
IJSONValidation
ILanguage
IMenu
ISnippet
ITheme
IColor
isIExtensionIdentifier
Entry
IStartArguments
FileLogger
NullLogger
NodeRequestOptions
UseDefaultProfileFlags
EmptyWindowWorkspaceIdentifier
UserDataProfilesObject
IMergeResult
IGlobalStateResourcePreview
parseKeybindings
IMergeResult
areSame
IMergeResult
merge
IMergeResult
IUserDataProfileManifestResourceMergeResult
IUserDataProfilesManifestResourcePreview
IStorageValue
LogLevel
IFilterViewPaneOptions
NotificationHandle
IViewContainerDescriptor
IExperimentAction
ConfigBasedExtensionRecommendation
EXTENSION_LIST_ELEMENT_HEIGHT
ExtensionListRendererOptions
IExtensionTemplateData
IUnknownExtensionTemplateData
IExtensionData
AsyncDataSource
VirualDelegate
ExtensionRenderer
UnknownExtensionRenderer
ExtensionsListViewOptions
ExtensionHoverOptions
extensionSponsorIconColor
onExtensionChanged
isKeymapExtension
ResourceGlobMatcher
MarkerViewModel
IMarkersFiltersOptions
OUTPUT_MODE_ID
LOG_MIME
LOG_SCHEME
LOG_MODE_ID
OUTPUT_VIEW_ID
CONTEXT_ACTIVE_LOG_OUTPUT
CONTEXT_OUTPUT_SCROLL_LOCK
OutputChannelUpdateMode
IOutputChannel
KeybindingsSearchOptions
IEndpointDetails
IOptions
PatternInputWidget
IConfigurationValue
IConfigurationEditingOptions
ConfigurationCache
ConfigurationCache
ConfigurationCache
DynamicRecommendation
ConfigRecommendation
ExecutableRecommendation
CachedRecommendation
ApplicationRecommendation
ExperimentalRecommendation
OUTPUT_SERVICE_ID
MAX_OUTPUT_LENGTH
ISettingsSection
IKeybindingsEditorSearchOptions
isNullRange
AbstractSettingsModel
IProgressScope
IProfileStorageKey
ActionTrigger
IActionOptions
IButtonWithDescription
LayoutAnchorMode
IDialogOptions
ISerializableView
IViewDeserializer
ISerializedLeafNode
ISerializedBranchNode
ISerializedNode
ISerializedGridView
INodeDescriptor
MenuBarMenu
IPaneDndController
DefaultPaneDndController
IConfirmDialogArgs
IShowDialogArgs
IInputDialogArgs
ICustomDialogMarkdown
IExtensionCapabilities
LimitedWorkspaceSupportType
ExtensionUntrustedWorkspaceSupport
ExtensionVirtualWorkspaceSupport
IMenubarMenuItemSeparator
IMenuStyleOverrides
defaultMenuStyles
defaultDialogStyles
WorkspaceTrustScope
ICompositeDragAndDropObserverCallbacks
DraggedCompositeIdentifier
DraggedViewIdentifier
ViewType
MovePanelToSecondarySideBarAction
MoveSecondarySideBarToPanelAction
IPaneColors
IViewPaneContainerOptions
IDialogHandle
FolderSettingsActionViewItem
createGroupIterator
NonCollapsibleObjectTreeModel
ListSettingListModel
AbstractListSettingWidget
CanonicalWorkspace
TestPaneCompositeService
TestSideBarPart
TestPanelPart
IDialogStyles
PreserveCaseToggle
IToggleOpts
IPossiblePowerShellExe
IEditorWorkerClient
IWordRange
IAuthenticationContribution
WindowStyles
WindowData
IToggleStyleOverrides
Item
ExtHostQuickOpen
NetworkDebugAdapter
IFeedbackWidgetOptions
getSystemShellSync
matchesContiguousIconAware
IMenuEntryActionViewItemOptions
ILinuxEnv
EnvironmentVariableMutatorType
IEnvironmentVariableMutator
IBaseUnresolvedTerminalProfile
ITerminalFormatMessageOptions
getOutputMatchForCommand
deserializeMessage
PersistentTerminalProcess
ITerminalSerializer
ShellIntegrationExecutable
shellIntegrationArgs
IProfileVariableResolver
ExtHostPseudoterminal
EnvironmentVariableCollection
ISearchOptions
ITerminalBeforeHandleLinkEvent
TerminalQuickFixCallback
ITerminalQuickFixCommandAction
IProfileContextProvider
AnyCommandLineRegex
IEventEmitter
ITerminalExternalLinkType
IResolvedValidLink
OPEN_FILE_LABEL
FOLDER_IN_WORKSPACE_LABEL
FOLDER_NOT_IN_WORKSPACE_LABEL
IActivateLinkEvent
IShowHoverEvent
positionIsInRange
XtermLinkMatcherValidationCallback
ConfirmOnExit
ITerminalLinkActivationResult
INullableProcessEnvironment
IDebugAdapterExecutableOptions
IDebugAdapterInlineImpl
IDebugAdapterImpl
IDebugAdapterTrackerFactory
ITerminalLauncher
PromptStringInputInfo
PickStringInputInfo
CommandInputInfo
IVariableResolveContext