Issue 1:
I tried using the @types/xxxx package and had problems.

I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript

I have a question that is inappropriate for StackOverflow. (Please ask any appropriate questions there).

Mention the authors (see Definitions by: in index.d.ts) so they can respond.

Authors: @bczengel @chrootsu @stepancar

The following code:

export const filterStepsByPrograms = (educationalProgramSteps: EducationalProgramStep[], programs: EducationalProgram[]): EducationalProgramStep[] => {
return filter(educationalProgramSteps, (step: EducationalProgramStep) => {
return find(programs, { name: getValue(step, 'program.name') });
});
};

Generates the following error:

Type 'number' is not assignable to type 'EducationalProgramStep'.

But this should be valid and shouldn't throw an error

Using | any fixes the error

export const filterStepsByPrograms = (educationalProgramSteps: EducationalProgramStep[], programs: EducationalProgram[]): EducationalProgramStep[] => {
return filter(educationalProgramSteps, (step: EducationalProgramStep | any) => {
return find(programs, { name: getValue(step, 'program.name') });
});
};

Doc: https://lodash.com/docs/4.17.15#filter

index.d.ts

// Type definitions for lodash.filter 4.6
// Project: https://lodash.com
// Definitions by: Brian Zengel <https://github.com/bczengel>, Ilya Mochalov <https://github.com/chrootsu>, Stepan Mikhaylyuk <https://github.com/stepancar>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8

// Generated from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/lodash/scripts/generate-modules.ts

import { filter } from "lodash";
export = filter;

@types/lodash/common/collection.d.ts

interface LoDashStatic {
/**
* Iterates over elements of collection, returning an array of all elements predicate returns truthy for. The
* predicate is invoked with three arguments: (value, index|key, collection).
*
* @param collection The collection to iterate over.
* @param predicate The function invoked per iteration.
* @return Returns the new filtered array.
*/
filter(
collection: string | null | undefined,
predicate?: StringIterator<boolean>
): string[];

/**
* @see _.filter
*/
filter<T, S extends T>(
collection: List<T> | null | undefined,
predicate: ListIteratorTypeGuard<T, S>
): S[];

/**
* @see _.filter
*/
filter<T>(
collection: List<T> | null | undefined,
predicate?: ListIterateeCustom<T, boolean>
): T[];

/**
* @see _.filter
*/
filter<T extends object, S extends T[keyof T]>(
collection: T | null | undefined,
predicate: ObjectIteratorTypeGuard<T, S>
): S[];

/**
* @see _.filter
*/
filter<T extends object>(
collection: T | null | undefined,
predicate?: ObjectIterateeCustom<T, boolean>
): Array<T[keyof T]>;
}

Issue 2:
I tried using the @types/xxxx package and had problems.

I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript

Mention the authors (see Definitions by: in index.d.ts) so they can respond.

Authors: @Igorbek @Igmat @lavoaster @Kovensky

One of the default examples of how to use styled-components in Typescript seem to be broken.

import React from 'react';
import styled from 'styled-components';

interface LogoProps {
/* This prop is optional, since TypeScript won't know that it's passed by the wrapper */
className?: string;
}

class Logo extends React.Component<LogoProps, {}> {
render() {
return <div className={this.props.className}>Logo</div>;
}
}

const LogoStyled = styled(Logo)`
font-family: 'Helvetica';
font-weight: bold;
font-size: 1.8rem;
`;

It gives the following error:

Argument of type 'typeof Logo' is not assignable to parameter of type 'ComponentType<any>'.
Type 'typeof Logo' is not assignable to type 'ComponentClass<any, any>'.
Types of property 'contextType' are incompatible.
Type 'React.Context<any> | undefined' is not assignable to type 'import("/node_modules/@types/react-dom/node_modules/@types/react/index").Context<any> | undefined'.
Type 'React.Context<any>' is not assignable to type 'import("/node_modules/@types/react-dom/node_modules/@types/react/index").Context<any>'.ts(2345)
class Logo

Dependencies:

@types/styled-components@4.1.4

@types/react@16.7.17