Skip to content

Commit

Permalink
Manually some remove existential types from xplat/js
Browse files Browse the repository at this point in the history
Summary:
Manually remove some existential types.

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D29724881

fbshipit-source-id: e21558dc033fa07d0b8a188eb64e14ddcf7df2ac
  • Loading branch information
evanyeung authored and facebook-github-bot committed Jul 21, 2021
1 parent e1d17c7 commit 24ba0db
Showing 1 changed file with 40 additions and 5 deletions.
45 changes: 40 additions & 5 deletions packages/rn-tester/js/examples/Text/TextExample.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ type TextAlignExampleRTLState = {|
isRTL: boolean,
|};

class TextAlignRTLExample extends React.Component<*, TextAlignExampleRTLState> {
constructor(...args: Array<*>) {
class TextAlignRTLExample extends React.Component<
{},
TextAlignExampleRTLState,
> {
constructor(...args: Array<any>) {
super(...args);

this.state = {
Expand Down Expand Up @@ -264,7 +267,7 @@ class AdjustingFontSize extends React.Component<
}
}

class TextBaseLineLayoutExample extends React.Component<*, *> {
class TextBaseLineLayoutExample extends React.Component<{}, mixed> {
render() {
const texts = [];
for (let i = 9; i >= 0; i--) {
Expand Down Expand Up @@ -355,7 +358,24 @@ class TextBaseLineLayoutExample extends React.Component<*, *> {
}
}

class TextRenderInfoExample extends React.Component<*, *> {
class TextRenderInfoExample extends React.Component<
{},
{
fontSize: number,
numberOfTextBlocks: number,
textMetrics: $ReadOnly<{
ascender: number,
capHeight: number,
descender: number,
height: number,
text?: string,
width: number,
x: number,
xHeight: number,
y: number,
}>,
},
> {
state = {
textMetrics: {
x: 0,
Expand Down Expand Up @@ -439,7 +459,22 @@ class TextRenderInfoExample extends React.Component<*, *> {
}
}

class TextWithCapBaseBox extends React.Component<*, *> {
class TextWithCapBaseBox extends React.Component<
{children: string, style?: any},
{
textMetrics: $ReadOnly<{
ascender: number,
capHeight: number,
descender: number,
height: number,
text?: string,
width: number,
x: number,
xHeight: number,
y: number,
}>,
},
> {
state = {
textMetrics: {
x: 0,
Expand Down

0 comments on commit 24ba0db

Please sign in to comment.