mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Rename DOMRectLike as DOMRectInit to align with spec (#46516)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46516 Changelog: [internal] Minor naming change Reviewed By: NickGerleman Differential Revision: D62755993 fbshipit-source-id: ad79002970500d31643fc555c9582e712d264175
This commit is contained in:
committed by
Facebook GitHub Bot
parent
259f61ac6b
commit
f8a003b9b2
@@ -14,7 +14,7 @@
|
||||
* licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).
|
||||
*/
|
||||
|
||||
import DOMRectReadOnly, {type DOMRectLike} from './DOMRectReadOnly';
|
||||
import DOMRectReadOnly, {type DOMRectInit} from './DOMRectReadOnly';
|
||||
|
||||
// flowlint unsafe-getters-setters:off
|
||||
|
||||
@@ -72,7 +72,7 @@ export default class DOMRect extends DOMRectReadOnly {
|
||||
/**
|
||||
* Creates a new `DOMRect` object with a given location and dimensions.
|
||||
*/
|
||||
static fromRect(rect?: ?DOMRectLike): DOMRect {
|
||||
static fromRect(rect?: ?DOMRectInit): DOMRect {
|
||||
if (!rect) {
|
||||
return new DOMRect();
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
// flowlint sketchy-null:off, unsafe-getters-setters:off
|
||||
|
||||
export interface DOMRectLike {
|
||||
export interface DOMRectInit {
|
||||
x?: ?number;
|
||||
y?: ?number;
|
||||
width?: ?number;
|
||||
@@ -146,7 +146,7 @@ export default class DOMRectReadOnly {
|
||||
/**
|
||||
* Creates a new `DOMRectReadOnly` object with a given location and dimensions.
|
||||
*/
|
||||
static fromRect(rect?: ?DOMRectLike): DOMRectReadOnly {
|
||||
static fromRect(rect?: ?DOMRectInit): DOMRectReadOnly {
|
||||
if (!rect) {
|
||||
return new DOMRectReadOnly();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user