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

Failure in 'lib.d.ts' with '--strictNullChecks' #9244

Closed
DanielRosenwasser opened this issue Jun 18, 2016 · 1 comment
Closed

Failure in 'lib.d.ts' with '--strictNullChecks' #9244

DanielRosenwasser opened this issue Jun 18, 2016 · 1 comment
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue

Comments

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Jun 18, 2016

Found in nightlies (Version 1.9.0-dev.20160618-1.0)

  1. Create an empty test.ts file.
  2. Create the following tsconfig.json in the same directory:
{
    "compilerOptions": {
        "strictNullChecks": true
    },
    "files": ["./test.ts"]
}
  1. Run tsc from the same directory.
../AppData/Roaming/npm/node_modules/typescript/lib/lib.d.ts(18107,5): error TS2411: Property 'alpha' of type 'boolean | undefined' is not assignable to string index type 'boolean | string'.
../AppData/Roaming/npm/node_modules/typescript/lib/lib.d.ts(18108,5): error TS2411: Property 'willReadFrequently' of type 'boolean | undefined' is not assignable to string index type 'boolean | string'.
../AppData/Roaming/npm/node_modules/typescript/lib/lib.d.ts(18109,5): error TS2411: Property 'storage' of type 'boolean | undefined' is not assignable to string index type 'boolean | string'.

Basically there are issues with index signatures and optional properties.

@mhegazy
Copy link
Contributor

mhegazy commented Jun 18, 2016

Submitted a fix to master to unblock the nightly. investigating why our tests did not catch this.

@zhengbli zhengbli reopened this Jun 18, 2016
@zhengbli zhengbli added the Fixed A PR has been merged for this issue label Jun 19, 2016
yuit added a commit that referenced this issue Jul 11, 2016
* Initial support for globs in tsconfig.json

* Added caching, more tests

* Added stubs to ChakraHost interface for readDirectoryNames/readFileNames

* Fixed typos in comments

* Changed name of 'reduce' method added to FileSet

* Heavily revised implementation that relies on an updated 'readDirectory' API.

* more tests

* Minor update to shims.ts for forthcoming VS support for globs.

* Detailed comments for regular expressions and renamed some files.

* Comment cleanup

* Fixed new linter warnings

* Add upper limit for the program size, fix readDirectory for the symlink files

* Add comments

* CR feedback / Change upper limit / Add disableSizeLimit compiler option

* online and offline CR feedback

* Don't count current opened client file if it's TS file

* Speed up file searching

* Make language service optional for a project

* Fix failed tests

* Fix project updateing issue after editing config file

* Fixing linter and test errors

* Bringing back excludes error and fixing faulty test

* Fixing lint errors

* Passing regular expressions to native hosts

* Fix merging issues and multiple project scenario

* Refactoring

* add test and spit commandLineParser changes to another PR

* Fix #8523

* check the declaration and use order if both are not in module file

* Type guards using discriminant properties of string literal types

* Fix #9098: report missing function impelementation errors for merged classes and namespaces

* Narrow type in case/default sections in switch on discriminant property

* No implicit returns following exhaustive switch statements

* Narrow non-union types to ensure consistent results

* Add tests

* No Need to store dot token when parsing property access expression

* Added tests.

* Accepted baselines.

* Check tuple types when getting the type node's type.

* Accepted baselines.

* Fix #9173: clear out lib and types before creating a program in transpileModule

* Added tests.

* Accepted baselines.

* Always check type assertion types.

* Clear out unused compiler options when transpiling

* Accepted baselines.

* improve error message for extending interface

* accept baselines

* Use helper functions to simplify range tests

* Remove String, Number, and Boolean from TypeFlags.Falsy

* Add regression test

* Accept new baselines

* Allow property declarations in .js files

* Remove old test

* Do not use Object.assing in test

* Fix comment

* Refactor code to make if statements cheaper

* ignore casing when converting a source file path to relative path

* add tests & add branches for module interface

* Using baselines for transpile unittests (#9195)

* Conver to Transpile unittest to use baselines instead

* Add baselines

* Fix linting error

* use resolveEntityName to find interface

* add new tests for extends interface

* address code style

* Refactor navigation bar

* routine dom update

* Updating readDirectory for tsserverProjectSystem unit tests

* Array#map -> ts.map.

* Responding to PR feedback

* Add conditional index signature for Canvas2DContextAttributes (#9244)

* Add libcheck tests

* Add missing worker types

* Accept webworker baselines

* Classify `this` in parameter position as a keyword

* Adding more matchFiles test cases

* Use implicit boolean casts; it doesn't hurt performance

* Use getCanonicalFileName

* export interface used by other exported functions

* Fix from merging with master

* Update tests and baselines from merging with master

* Remove using dotToken as it is no longer needed

* Update baselines from removing dotToken

* Address PR: Add NodeEmitFlags to no indent when emit

* Address PR; and refactor setting NodeEmitFlags for createMemberAccessForPropertyName

* Update baselines
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

3 participants