diff options
author | Matthew Miller <matthew@millerti.me> | 2023-08-18 13:59:11 -0700 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2023-08-18 13:59:11 -0700 |
commit | a59634a1a9b0393622fb121fbe229132c01a2624 (patch) | |
tree | cb4eb3fdf778dfc88d6d389b609b1cef6ebb4b4d /packages/typescript-types/extract-dom-types.ts | |
parent | e0d32bd2a3a60b4b2fd96a2874eae3ad976483df (diff) |
Use single-quotes and increase line width
Diffstat (limited to 'packages/typescript-types/extract-dom-types.ts')
-rw-r--r-- | packages/typescript-types/extract-dom-types.ts | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/packages/typescript-types/extract-dom-types.ts b/packages/typescript-types/extract-dom-types.ts index a5362f7..436ac5b 100644 --- a/packages/typescript-types/extract-dom-types.ts +++ b/packages/typescript-types/extract-dom-types.ts @@ -16,33 +16,33 @@ import { Structure, SyntaxKind, TypeAliasDeclaration, -} from "ts-morph"; -import { version } from "typescript"; +} from 'ts-morph'; +import { version } from 'typescript'; // List of types we directly reference from the dom lib. Only interface and type // alias identifiers are valid, since other syntax types (class, function, var) // are implementations, which will not be available outside of the browser. const types = [ - "AuthenticatorAssertionResponse", - "AttestationConveyancePreference", - "AuthenticatorAttestationResponse", - "AuthenticatorTransport", - "AuthenticationExtensionsClientInputs", - "AuthenticationExtensionsClientOutputs", - "AuthenticatorSelectionCriteria", - "COSEAlgorithmIdentifier", - "Crypto", - "PublicKeyCredential", - "PublicKeyCredentialCreationOptions", - "PublicKeyCredentialDescriptor", - "PublicKeyCredentialParameters", - "PublicKeyCredentialRequestOptions", - "PublicKeyCredentialUserEntity", - "UserVerificationRequirement", + 'AuthenticatorAssertionResponse', + 'AttestationConveyancePreference', + 'AuthenticatorAttestationResponse', + 'AuthenticatorTransport', + 'AuthenticationExtensionsClientInputs', + 'AuthenticationExtensionsClientOutputs', + 'AuthenticatorSelectionCriteria', + 'COSEAlgorithmIdentifier', + 'Crypto', + 'PublicKeyCredential', + 'PublicKeyCredentialCreationOptions', + 'PublicKeyCredentialDescriptor', + 'PublicKeyCredentialParameters', + 'PublicKeyCredentialRequestOptions', + 'PublicKeyCredentialUserEntity', + 'UserVerificationRequirement', ]; const project = new Project({ skipAddingFilesFromTsConfig: true }); -const domSourcePath = "typescript/lib/lib.dom.d.ts"; +const domSourcePath = 'typescript/lib/lib.dom.d.ts'; const domSourceFile = project.addSourceFileAtPath( require.resolve(domSourcePath), ); @@ -91,9 +91,7 @@ outputSourceFile.addStatements([ `// To regenerate, run the following command from the project root:`, `// npx lerna --scope=@simplewebauthn/typescript-types exec -- npm run extract-dom-types`, ]); -const resolvedStructures = Array.from(resolvedNodes).map((node) => - node.getStructure() -); +const resolvedStructures = Array.from(resolvedNodes).map((node) => node.getStructure()); outputSourceFile.addInterfaces( resolvedStructures.filter(Structure.isInterface), ); |