<commit_before># Typescript Support

Styled-components has typescript definitions to allow the library to be
used in any Typescript project.

To use the library you can import it as you normally do with any TS dependency.

```
import styled from "styled-components";
```

## Example

A very basic example can be found [here](https://github.com/patrick91/Styled-Components-Typescript-Example).

## Caveats

### Class Name

When defining a component you'd need to have `className` marked as optional
in the propTypes interface:

```
interface LogoProps {
    className?: string;
}


class Logo extends React.Component<LogoProps, {}> {
    render() {
        return <div className={this.props.className}><commit_msg>Consistend readme<commit_after># Typescript Support

`styled-components` has typescript definitions to allow the library to be
used in any Typescript project.

To use the library you can import it as you normally do with any TS dependency.

```
import styled from 'styled-components'
```

## Example

A very basic example can be found [here](https://github.com/patrick91/Styled-Components-Typescript-Example).

## Caveats

### Class Name

When defining a component you'd need to have `className` marked as optional
in the propTypes interface:

```
interface LogoProps {
    className?: string;
}


class Logo extends React.Component<LogoProps, {}> {
    render() {
        return <div className={this.props.className}>
{'fraction_non_alphanumeric': 0.09433962264150944, 'fraction_numerical': 0.002795248078266946, 'mean_word_length': 4.424242424242424, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '486344', 'n_tokens_mistral': 410, 'n_tokens_neox': 388, 'n_words': 156}