This product is not supported for your selected Datadog site. ().
このページは日本語には対応しておりません。随時翻訳に取り組んでいます。
翻訳に関してご質問やご意見ございましたら、お気軽にご連絡ください

Metadata

ID: typescript-code-style/parameter-name

Language: TypeScript

Severity: Notice

Category: Code Style

Description

Ensure that parameter names use camelCase and not snake_case or PascalCase.

Non-Compliant Code Examples

const a = { setValue(NewValue, event_info?) {} }
class A { setValue(NewValue, event_info__) {} }
function setValue(NewValue, $_event_info_) {}
const a = function(NewValue, event_info) {}
function render(Widget: string) {}
function renderSomething(WrappedComponent) {}

Compliant Code Examples

const a = { getValue() {} }
class A { setValue(newValue_) {} }
class B { setValue(md5, valid5String) {} }
class B { setValue(_, valid5String) {} }
class C { setValue(UID, valid5String) {} }
async.doSomething(nothing, (n, _cb) => {}
function withFeature(WrappedComponent) { return WrappedComponent; }

const MyComponent = () => {
  const renderItem = useCallback((Item: unknown) => <Item />, []);
  const renderHeader = useMemo(() => (Header: unknown) => <Header />, []);
  return <List renderItem={renderItem} />;
};
https://static.datadoghq.com/static/images/logos/github_avatar.svg https://static.datadoghq.com/static/images/logos/vscode_avatar.svg jetbrains

シームレスな統合。 Datadog Code Security をお試しください