• Version 1.1.3
  • Published
  • 4.11 kB
  • No dependencies
  • MIT license


npm i @types/psl
yarn add @types/psl
pnpm add @types/psl


TypeScript definitions for psl



function get

get: { (domain: null | undefined): null; (domain: string): string };

    function isValid

    isValid: (domain: string) => boolean;

      function parse

      parse: (domain: string) => ParsedDomain | ParseError;


        interface ParsedDomain

        interface ParsedDomain {}

          property domain

          domain: string | null;

            property error

            error: undefined;

              property input

              input: string;

                property listed

                listed: boolean;

                  property sld

                  sld: string | null;

                    property subdomain

                    subdomain: string | null;

                      property tld

                      tld: string | null;

                        interface ParseError

                        interface ParseError {}

                          property error

                          error: {
                          | 'DOMAIN_TOO_SHORT'
                          | 'DOMAIN_TOO_LONG'
                          | 'LABEL_STARTS_WITH_DASH'
                          | 'LABEL_ENDS_WITH_DASH'
                          | 'LABEL_TOO_LONG'
                          | 'LABEL_TOO_SHORT'
                          | 'LABEL_INVALID_CHARS';
                          message: string;

                            property input

                            input: string;

                              Package Files (1)

                              Dependencies (0)

                              No dependencies.

                              Dev Dependencies (0)

                              No dev dependencies.

                              Peer Dependencies (0)

                              No peer dependencies.


                              To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                              You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/psl.

                              • Markdown
                              • HTML
                                <a href="https://www.jsdocs.io/package/@types/psl"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>