Issue 1:
If you know how to fix the issue, make a pull request instead.

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: @GlenCFL, @smhxx

This one's according to documentation: https://atom.io/docs/api/v1.22.1/TooltipManager#instance-add:

title | A String or Function to use for the text in the tip. If a function is passed, this will be set to the target element. This option is mutually exclusive with the item option.

Current definition is like this:

export interface TooltipManager {
/** Add a tooltip to the given element. */
add(target: HTMLElement, options: {
title?: string,
html?: boolean,
item?: HTMLElement|{ element: HTMLElement },
class?: string,
placement?: "top"|"bottom"|"left"|"right"|"auto"|(() => string),
trigger?: "click"|"hover"|"focus"|"manual",
delay?: { show: number, hide: number },
keyBindingCommand?: string,
keyBindingTarget?: HTMLElement
} | {
title?: string|(() => string),
html?: boolean,
item?: HTMLElement|{ element: HTMLElement },
class?: string,
placement?: "top"|"bottom"|"left"|"right"|"auto"|(() => string),
trigger?: "click"|"hover"|"focus"|"manual",
delay?: { show: number, hide: number },
}): Disposable;

should probably be:

export interface TooltipManager {
/** Add a tooltip to the given element. */
add(target: HTMLElement, options: {
item?: HTMLElement|{ element: HTMLElement },
class?: string,
placement?: "top"|"bottom"|"left"|"right"|"auto"|(() => string),
trigger?: "click"|"hover"|"focus"|"manual",
delay?: { show: number, hide: number },
keyBindingCommand?: string,
keyBindingTarget?: HTMLElement
} | {
title?: string|(() => string),
html?: boolean,
class?: string,
placement?: "top"|"bottom"|"left"|"right"|"auto"|(() => string),
trigger?: "click"|"hover"|"focus"|"manual",
delay?: { show: number, hide: number },
}): Disposable;

While on topic, type of placement is both too concrete and not concrete enough. First of, auto isn't a separate option, but a specifier, so possible values are:

top, bottom, left, right

auto top, auto bottom, auto left, auto right

auto is the same as auto top

On another hand, function has to return one of these options, not arbitrary string.

Also while on topic, I think item can be anything that Atom's view algorithm will get a view for. At least it's usage suggests that: https://github.com/atom/atom/blob/v1.22.1/src/tooltip.js#L342

Last point, it should be possible to reduce code duplication a bit:

export interface TooltipManager {
/** Add a tooltip to the given element. */
add(target: HTMLElement, options: ({
item?: HTMLElement|{ element: HTMLElement }
} | {
title?: string|(() => string),
html?: boolean,
keyBindingCommand?: string,
keyBindingTarget?: HTMLElement
}) & {
class?: string,
placement?: "top"|"bottom"|"left"|"right"|"auto"|(() => string),
trigger?: "click"|"hover"|"focus"|"manual",
delay?: { show: number, hide: number }
}): Disposable;

Note: not sure on how keyBindingCommand and keyBindingTarget behave when passed with item, documentation is silent about that, but mention of title implies those are ignored if item is set.

Issue 2:
I tried using the @types/react 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: @johnnyreilly @bbenezech @pzavolinsky @digiguru @ericanderson @morcerf @tkrotoff @DovydasNavickas @onigoetz @richseviora

file: '.../@types/react/index.d.ts'
severity: 'Error'
message: 'Interface 'Element' cannot simultaneously extend types 'ReactElement<any>' and 'ReactElement<any>'.
Named property 'type' of types 'ReactElement<any>' and 'ReactElement<any>' are not identical.'
at: '3454,19'
source: 'ts'

file: '.../@types/react/index.d.ts'
severity: 'Error'
message: 'Interface 'ElementClass' cannot simultaneously extend types 'Component<any, {}>' and 'Component<any, {}>'.
Named property 'refs' of types 'Component<any, {}>' and 'Component<any, {}>' are not identical.'
at: '3455,19'
source: 'ts'