hsluoyz commented on issue #568: URL: https://github.com/apache/casbin-node-casbin/issues/568#issuecomment-5603822577
@hughrawlinson Good point — `any[]` was hiding a set of argument combinations that's actually finite and well-defined. Fixed in: https://github.com/apache/casbin-node-casbin/commit/aad42ce2be70908bbc76c5b89b505cf0655245e8: `newEnforcer`, `newEnforcerWithClass`, `newCachedEnforcer` and `newSyncedEnforcer` now take a `NewEnforcerParams` union of labeled tuples, so you get proper autocomplete and invalid calls like `newEnforcer(model, 'policy.csv')` (which used to throw at runtime) are caught at compile time. Runtime behavior is unchanged. Thanks for raising it! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
