GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Weak type errors for primitives by sandersn · Pull Request #16343 · microsoft/TypeScript

Conversation

@sandersn

@sandersn Nathan Shively-Sanders (sandersn) commented Jun 7, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Fixes #16333

Previously, weak type errors didn't occur with primitive sources because the apparent type of primitives all include toString. isKnownProperty reports that toString is known for all types because it falls back to globalObjectType when it can't find the property on the given type.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Nathan Shively-Sanders (sandersn) added 2 commits June 7, 2017 16:20
@sandersn
Detect weak type errors with primitive sources
efa490e
@sandersn
Test weak type errors with primitives
b509e68
@msftclas Microsoft Contribution License Agreements (msftclas) added the cla-not-required label Jun 7, 2017
@sandersn Nathan Shively-Sanders (sandersn) changed the title Weak types for primitives Weak type errors for primitives Jun 7, 2017
@sandersn Nathan Shively-Sanders (sandersn) mentioned this pull request Jun 7, 2017
Primitives are assignable to weak types #16333
Closed
Nathan Shively-Sanders (sandersn) added 2 commits June 8, 2017 09:01
@sandersn
Always use getPropertyOfObjectType in isKnownProperty
7797b1d
It doesn't make sense to say that 'toString' is part of a weak type
since having 'toString' would mean that the type isn't actually weak.
@sandersn
Update tests and baselines
a5b68c0
@ikatyang Ika (ikatyang) mentioned this pull request Jun 8, 2017
Typescript does not work with defaults #16354
Closed
@sandersn
Nathan Shively-Sanders (sandersn) requested a review from Yui (yuit) June 8, 2017 16:20
yuit
Yui (yuit) approved these changes Jun 9, 2017
View reviewed changes
@sandersn
Nathan Shively-Sanders (sandersn) merged commit cae1286 into master Jun 9, 2017
@sandersn
Nathan Shively-Sanders (sandersn) deleted the weak-types-for-primitives branch June 9, 2017 16:03
@ikatyang Ika (ikatyang) mentioned this pull request Jun 22, 2017
Partial type passes for values that are strings and incorrect objects #16691
Closed
@ghost ghost mentioned this pull request Jun 23, 2017
node: Expand allowed arguments to http(s).get / request DefinitelyTyped/DefinitelyTyped#17433
Merged
6 of 8 tasks
@sandersn Nathan Shively-Sanders (sandersn) mentioned this pull request Jul 6, 2017
Weak type detection #16047
Merged
This was referenced Aug 17, 2017
twix: Allow "LT" as a format DefinitelyTyped/DefinitelyTyped#19065
Merged
sencha_touch: Make type of getScrollable() match interface DefinitelyTyped/DefinitelyTyped#19068
Merged
jqrangeslider: Fix compile error DefinitelyTyped/DefinitelyTyped#19086
Merged
gulp-useref: Fix tests DefinitelyTyped/DefinitelyTyped#19088
Merged
google.visualization: Allow legend: "none" DefinitelyTyped/DefinitelyTyped#19089
Merged
datatables.net: Allow "search" to be a boolean DefinitelyTyped/DefinitelyTyped#19092
Merged
mongoose: Fix compile errors DefinitelyTyped/DefinitelyTyped#19107
Merged
pad: Allow to use a string instead of an options object DefinitelyTyped/DefinitelyTyped#19208
Merged
react-native-goby: allow updateDialog to be a boolean DefinitelyTyped/DefinitelyTyped#19212
Merged
webpack: Fix tests DefinitelyTyped/DefinitelyTyped#19218
Merged
react-router/v3: Fix test DefinitelyTyped/DefinitelyTyped#19277
Merged
@microsoft Microsoft (microsoft) locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer
@yuit Yui (yuit) yuit approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@sandersn @yuit @msftclas
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.