Skip to content

Commit

Permalink
The program object in the strict language service is no longer undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
kamkry committed Apr 25, 2024
1 parent c496c08 commit b797f25
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.4.2] - 2024-04-09

### Fixed

- The strict language service program object is no longer undefined

## [2.4.1] - 2024-04-09

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "typescript-strict-plugin",
"version": "2.4.1",
"version": "2.4.2",
"description": "Typescript tools that help with migration to the strict mode",
"author": "Allegro",
"contributors": [
Expand Down
5 changes: 2 additions & 3 deletions src/plugin/index.ts
Expand Up @@ -7,13 +7,12 @@ import {
} from './utils';
import * as ts from 'typescript/lib/tsserverlibrary';

const init: ts.server.PluginModuleFactory = ({ typescript }) => {
const init: ts.server.PluginModuleFactory = () => {
function create(info: PluginInfo) {
const proxy = setupLanguageServiceProxy(info);

const strictLanguageServiceHost = setupStrictLanguageServiceHostProxy(info);
const strictLanguageService = typescript.createLanguageService(strictLanguageServiceHost);
strictLanguageService.getProgram();
const strictLanguageService = ts.createLanguageService(strictLanguageServiceHost);

log(info, 'Plugin initialized');

Expand Down

0 comments on commit b797f25

Please sign in to comment.