Skip to content

"postMessage" declartion in 'lib.dom.d.ts' may have a little problem #30042

@asurance

Description

@asurance

TypeScript Version: 3.3.3

  • postMessage declartion in lib.dom.d.ts is
declare function postMessage(message: any, targetOrigin: string, transfer?: Transferable[]): void;

Its second parameter targetOrigin is set as a must.
But I found samples on MDN about postMessage don't pass it.
There may lack a ? after targetOrigin.
When I set use strict of comile options true and don't pass targetOrigin, compiler will warn me ,which makes me X﹏X.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions