react-daum-postcode: Provides its own types (#39507)

* react-daum-postcode: Provides its own types

* Fix notNeededPackages.json after merge
This commit is contained in:
Alexander T
2019-11-07 11:03:17 -08:00
committed by Nathan Shively-Sanders
parent 51de8fe815
commit d73ef93f00
5 changed files with 6 additions and 82 deletions
+6
View File
@@ -3576,6 +3576,12 @@
"sourceRepoURL": "https://github.com/gor181/react-chartjs-2",
"asOfVersion": "2.5.7"
},
{
"libraryName": "react-daum-postcode",
"typingsPackageName": "react-daum-postcode",
"sourceRepoURL": "https://github.com/kimminsik-bernard/react-daum-postcode",
"asOfVersion": "1.6.1"
},
{
"libraryName": "react-collapsible",
"typingsPackageName": "react-collapsible",
-26
View File
@@ -1,26 +0,0 @@
// Type definitions for react-daum-postcode 1.3
// Project: https://github.com/kimminsik-bernard/react-daum-postcode
// Definitions by: Sa-ryong Kang <https://github.com/Sa-ryong>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import { Component } from 'react';
export namespace DaumPostcode {
interface Props {
onComplete: any;
width?: number | string;
height?: number | string;
autoClose?: boolean;
autoResize?: boolean;
animation?: boolean;
style?: any;
defaultQuery?: string;
theme?: any;
scriptUrl?: string;
}
}
export default class DaumPostcode extends Component<DaumPostcode.Props, any> {
render(): JSX.Element;
}
@@ -1,29 +0,0 @@
import * as React from 'react';
import DaumPostcode from 'react-daum-postcode';
class Postcode extends React.Component<any, any> {
handleAddress = (data: any) => {
let fullAddress: string = data.address;
let extraAddress = '';
if (data.addressType === 'R') {
if (data.bname !== '') {
extraAddress += data.bname;
}
if (data.buildingName !== '') {
extraAddress += (extraAddress !== '' ? `, ${data.buildingName}` : data.buildingName);
}
fullAddress += (extraAddress !== '' ? ` (${extraAddress})` : '');
}
console.log(fullAddress); // e.g. '서울 성동구 왕십리로2길 20 (성수동1가)'
}
render() {
return (
<DaumPostcode
onComplete={this.handleAddress}
/>
);
}
}
-26
View File
@@ -1,26 +0,0 @@
{
"files": [
"index.d.ts",
"react-daum-postcode-tests.tsx"
],
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"strictFunctionTypes": true,
"baseUrl": "../",
"jsx": "react",
"experimentalDecorators": true,
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
}
}
-1
View File
@@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }